From 6cabff08d7821304c2542778acba9bf0aab4e9d4 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 17 May 2016 20:18:24 +0100 Subject: [PATCH] Build and bump version --- dist/js/waveform-playlist.amd.js | 1100 +++++--------------- dist/js/waveform-playlist.amd.min.js | 6 +- dist/js/waveform-playlist.commonjs2.js | 1100 +++++--------------- dist/js/waveform-playlist.commonjs2.min.js | 6 +- dist/js/waveform-playlist.umd.js | 1100 +++++--------------- dist/js/waveform-playlist.umd.min.js | 6 +- dist/js/waveform-playlist.var.js | 1100 +++++--------------- dist/js/waveform-playlist.var.min.js | 6 +- package.json | 2 +- 9 files changed, 977 insertions(+), 3449 deletions(-) diff --git a/dist/js/waveform-playlist.amd.js b/dist/js/waveform-playlist.amd.js index a9661f7f..af623b84 100644 --- a/dist/js/waveform-playlist.amd.js +++ b/dist/js/waveform-playlist.amd.js @@ -74,23 +74,19 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { }); exports.init = init; - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _createElement = __webpack_require__(75); + var _createElement = __webpack_require__(66); var _createElement2 = _interopRequireDefault(_createElement); - var _domDelegator = __webpack_require__(46); - - var _domDelegator2 = _interopRequireDefault(_domDelegator); - - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); - var _Playlist = __webpack_require__(24); + var _Playlist = __webpack_require__(22); var _Playlist2 = _interopRequireDefault(_Playlist); @@ -99,7 +95,6 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { function init() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var ee = arguments.length <= 1 || arguments[1] === undefined ? (0, _eventEmitter2.default)() : arguments[1]; - var delegator = arguments.length <= 2 || arguments[2] === undefined ? (0, _domDelegator2.default)() : arguments[2]; if (options.container === undefined) { throw new Error("DOM element container must be given."); @@ -159,9 +154,6 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { playlist.tree = tree; playlist.rootNode = rootNode; - //have to add extra events that aren't followed by default. - delegator.listenTo("scroll"); - __webpack_require__.p = config.jsLocation; return playlist; @@ -239,32 +231,6 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, /* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var OneVersionConstraint = __webpack_require__(64); - - var MY_VERSION = '7'; - OneVersionConstraint('ev-store', MY_VERSION); - - var hashKey = '__EV_STORE_KEY@' + MY_VERSION; - - module.exports = EvStore; - - function EvStore(elem) { - var hash = elem[hashKey]; - - if (!hash) { - hash = elem[hashKey] = {}; - } - - return hash; - } - - -/***/ }, -/* 6 */ /***/ function(module, exports) { module.exports = isThunk @@ -275,7 +241,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { module.exports = isHook @@ -288,7 +254,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -301,7 +267,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -313,7 +279,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.createFadeIn = createFadeIn; exports.createFadeOut = createFadeOut; - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); var SCURVE = exports.SCURVE = "sCurve"; var LINEAR = exports.LINEAR = "linear"; @@ -403,7 +369,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -659,16 +625,16 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { - var h = __webpack_require__(84) + var h = __webpack_require__(75) module.exports = h /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports) { var nativeIsArray = Array.isArray @@ -682,7 +648,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 13 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -694,7 +660,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { }); exports.STATE_FINISHED = exports.STATE_DECODING = exports.STATE_LOADING = exports.STATE_UNINITIALIZED = undefined; - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); @@ -764,15 +730,13 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 14 */ -[96, 94], -/* 15 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var d = __webpack_require__(43) - , callable = __webpack_require__(58) + var d = __webpack_require__(40) + , callable = __webpack_require__(49) , apply = Function.prototype.apply, call = Function.prototype.call , create = Object.create, defineProperty = Object.defineProperty @@ -904,7 +868,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 16 */ +/* 14 */ /***/ function(module, exports) { 'use strict'; @@ -984,7 +948,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 17 */ +/* 15 */ /***/ function(module, exports) { "use strict"; @@ -995,7 +959,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 18 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -1006,8 +970,8 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keys = __webpack_require__(67), - rest = __webpack_require__(10); + var keys = __webpack_require__(58), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -1365,13 +1329,33 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 19 */ -[96, 95], -/* 20 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} + var minDoc = __webpack_require__(83); + + if (typeof document !== 'undefined') { + module.exports = document; + } else { + var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } + + module.exports = doccy; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = applyProperties @@ -1470,17 +1454,17 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 21 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) + var document = __webpack_require__(17) - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var handleThunk = __webpack_require__(22) + var handleThunk = __webpack_require__(20) module.exports = createElement @@ -1522,13 +1506,13 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 22 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) + var isThunk = __webpack_require__(5) module.exports = handleThunk @@ -1568,7 +1552,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 23 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -1596,7 +1580,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 24 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -1607,45 +1591,45 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _lodash = __webpack_require__(69); + var _lodash = __webpack_require__(60); var _lodash2 = _interopRequireDefault(_lodash); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _diff = __webpack_require__(76); + var _diff = __webpack_require__(67); var _diff2 = _interopRequireDefault(_diff); - var _patch = __webpack_require__(77); + var _patch = __webpack_require__(68); var _patch2 = _interopRequireDefault(_patch); var _conversions = __webpack_require__(1); - var _LoaderFactory = __webpack_require__(33); + var _LoaderFactory = __webpack_require__(31); var _LoaderFactory2 = _interopRequireDefault(_LoaderFactory); - var _ScrollHook = __webpack_require__(30); + var _ScrollHook = __webpack_require__(28); var _ScrollHook2 = _interopRequireDefault(_ScrollHook); - var _TimeScale = __webpack_require__(26); + var _TimeScale = __webpack_require__(24); var _TimeScale2 = _interopRequireDefault(_TimeScale); - var _Track = __webpack_require__(27); + var _Track = __webpack_require__(25); var _Track2 = _interopRequireDefault(_Track); - var _Playout = __webpack_require__(25); + var _Playout = __webpack_require__(23); var _Playout2 = _interopRequireDefault(_Playout); - var _recorderWorker = __webpack_require__(93); + var _recorderWorker = __webpack_require__(82); var _recorderWorker2 = _interopRequireDefault(_recorderWorker); @@ -2120,14 +2104,14 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { } }, { key: 'restartPlayFrom', - value: function restartPlayFrom(cursorPos) { + value: function restartPlayFrom(start, end) { this.stopAnimation(); this.tracks.forEach(function (editor) { editor.scheduleStop(); }); - return Promise.all(this.playoutPromises).then(this.play.bind(this, cursorPos, undefined)); + return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end)); } }, { key: 'play', @@ -2144,6 +2128,11 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { endTime = selected.end; } + if (this.isPlaying()) { + this.restartPlayFrom(startTime, endTime); + return; + } + this.tracks.forEach(function (track) { track.setState('cursor'); playoutPromises.push(track.schedulePlay(currentTime, startTime, endTime, { @@ -2337,7 +2326,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { "attributes": { "style": "overflow: auto;" }, - "ev-scroll": function evScroll(e) { + "onscroll": function onscroll(e) { _this12.scrollLeft = (0, _conversions.pixelsToSeconds)(e.target.scrollLeft, _this12.samplesPerPixel, _this12.sampleRate); _this12.ee.emit("scroll", _this12.scrollLeft); }, @@ -2363,7 +2352,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 25 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2374,7 +2363,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2506,7 +2495,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 26 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2519,11 +2508,11 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { var _conversions = __webpack_require__(1); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _TimeScaleHook = __webpack_require__(31); + var _TimeScaleHook = __webpack_require__(29); var _TimeScaleHook2 = _interopRequireDefault(_TimeScaleHook); @@ -2690,7 +2679,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 27 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2701,41 +2690,41 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(70); + var _lodash3 = __webpack_require__(61); var _lodash4 = _interopRequireDefault(_lodash3); - var _uuid = __webpack_require__(74); + var _uuid = __webpack_require__(65); var _uuid2 = _interopRequireDefault(_uuid); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); var _conversions = __webpack_require__(1); - var _webaudioPeaks = __webpack_require__(92); + var _webaudioPeaks = __webpack_require__(81); var _webaudioPeaks2 = _interopRequireDefault(_webaudioPeaks); - var _states = __webpack_require__(35); + var _states = __webpack_require__(33); var _states2 = _interopRequireDefault(_states); - var _CanvasHook = __webpack_require__(28); + var _CanvasHook = __webpack_require__(26); var _CanvasHook2 = _interopRequireDefault(_CanvasHook); - var _FadeCanvasHook = __webpack_require__(29); + var _FadeCanvasHook = __webpack_require__(27); var _FadeCanvasHook2 = _interopRequireDefault(_FadeCanvasHook); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3087,7 +3076,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { var stateEvents = state.getEvents(); Object.keys(stateEvents).map(function (event) { - config['ev-' + event] = stateEvents[event].bind(state); + config['on' + event] = stateEvents[event].bind(state); }); stateClass = state.getClasses(); @@ -3108,9 +3097,9 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { return (0, _h2.default)("div.controls", { attributes: { "style": 'height: ' + numChan * data.height + 'px; width: ' + data.controls.width + 'px; position: absolute; left: 0; z-index: 10;' - } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "ev-click": function evClick() { + } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "onclick": function onclick() { _this3.ee.emit("mute", _this3); - } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "ev-click": function evClick() { + } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "onclick": function onclick() { _this3.ee.emit("solo", _this3); } }, ["Solo"])]), (0, _h2.default)("label", [(0, _h2.default)("input.volume-slider", { attributes: { @@ -3119,7 +3108,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { "max": 100, "value": 100 }, - "ev-input": function evInput(e) { + "oninput": function oninput(e) { _this3.ee.emit("volumechange", e.target.value, _this3); } })])]); @@ -3280,7 +3269,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 28 */ +/* 26 */ /***/ function(module, exports) { 'use strict'; @@ -3350,7 +3339,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 29 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3361,9 +3350,9 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3444,7 +3433,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 30 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3485,7 +3474,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 31 */ +/* 29 */ /***/ function(module, exports) { 'use strict'; @@ -3542,7 +3531,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 32 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3555,7 +3544,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3619,7 +3608,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 33 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3630,11 +3619,11 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _BlobLoader = __webpack_require__(32); + var _BlobLoader = __webpack_require__(30); var _BlobLoader2 = _interopRequireDefault(_BlobLoader); - var _XHRLoader = __webpack_require__(34); + var _XHRLoader = __webpack_require__(32); var _XHRLoader2 = _interopRequireDefault(_XHRLoader); @@ -3666,7 +3655,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3679,7 +3668,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3741,7 +3730,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3750,23 +3739,23 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { value: true }); - var _CursorState = __webpack_require__(36); + var _CursorState = __webpack_require__(34); var _CursorState2 = _interopRequireDefault(_CursorState); - var _SelectState = __webpack_require__(39); + var _SelectState = __webpack_require__(37); var _SelectState2 = _interopRequireDefault(_SelectState); - var _ShiftState = __webpack_require__(40); + var _ShiftState = __webpack_require__(38); var _ShiftState2 = _interopRequireDefault(_ShiftState); - var _FadeInState = __webpack_require__(37); + var _FadeInState = __webpack_require__(35); var _FadeInState2 = _interopRequireDefault(_FadeInState); - var _FadeOutState = __webpack_require__(38); + var _FadeOutState = __webpack_require__(36); var _FadeOutState2 = _interopRequireDefault(_FadeOutState); @@ -3781,7 +3770,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { }; /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3835,7 +3824,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3889,7 +3878,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3943,7 +3932,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4026,7 +4015,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4101,7 +4090,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { exports.default = _class; /***/ }, -/* 41 */ +/* 39 */ /***/ function(module, exports) { /*! @@ -4213,131 +4202,15 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * cuid.js - * Collision-resistant UID generator for browsers and node. - * Sequential for fast db lookups and recency sorting. - * Safe for element IDs and server-side lookups. - * - * Extracted from CLCTR - * - * Copyright (c) Eric Elliott 2012 - * MIT License - */ - - /*global window, navigator, document, require, process, module */ - (function (app) { - 'use strict'; - var namespace = 'cuid', - c = 0, - blockSize = 4, - base = 36, - discreteValues = Math.pow(base, blockSize), - - pad = function pad(num, size) { - var s = "000000000" + num; - return s.substr(s.length-size); - }, - - randomBlock = function randomBlock() { - return pad((Math.random() * - discreteValues << 0) - .toString(base), blockSize); - }, - - safeCounter = function () { - c = (c < discreteValues) ? c : 0; - c++; // this is not subliminal - return c - 1; - }, - - api = function cuid() { - // Starting with a lowercase letter makes - // it HTML element ID friendly. - var letter = 'c', // hard-coded allows for sequential access - - // timestamp - // warning: this exposes the exact date and time - // that the uid was created. - timestamp = (new Date().getTime()).toString(base), - - // Prevent same-machine collisions. - counter, - - // A few chars to generate distinct ids for different - // clients (so different computers are far less - // likely to generate the same id) - fingerprint = api.fingerprint(), - - // Grab some more chars from Math.random() - random = randomBlock() + randomBlock(); - - counter = pad(safeCounter().toString(base), blockSize); - - return (letter + timestamp + counter + fingerprint + random); - }; - - api.slug = function slug() { - var date = new Date().getTime().toString(36), - counter, - print = api.fingerprint().slice(0,1) + - api.fingerprint().slice(-1), - random = randomBlock().slice(-2); - - counter = safeCounter().toString(36).slice(-4); - - return date.slice(-2) + - counter + print + random; - }; - - api.globalCount = function globalCount() { - // We want to cache the results of this - var cache = (function calc() { - var i, - count = 0; - - for (i in window) { - count++; - } - - return count; - }()); - - api.globalCount = function () { return cache; }; - return cache; - }; - - api.fingerprint = function browserPrint() { - return pad((navigator.mimeTypes.length + - navigator.userAgent.length).toString(36) + - api.globalCount().toString(36), 4); - }; - - // don't change anything from here down. - if (app.register) { - app.register(namespace, api); - } else if (true) { - module.exports = api; - } else { - app[namespace] = api; - } - - }(this.applitude || this)); - - -/***/ }, -/* 43 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var assign = __webpack_require__(50) - , normalizeOpts = __webpack_require__(57) - , isCallable = __webpack_require__(53) - , contains = __webpack_require__(60) + var assign = __webpack_require__(41) + , normalizeOpts = __webpack_require__(48) + , isCallable = __webpack_require__(44) + , contains = __webpack_require__(51) , d; @@ -4398,435 +4271,18 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = addEvent - - function addEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - events[type] = handler - } else if (Array.isArray(event)) { - if (event.indexOf(handler) === -1) { - event.push(handler) - } - } else if (event !== handler) { - events[type] = [event, handler] - } - } - - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - var globalDocument = __webpack_require__(14) - var EvStore = __webpack_require__(5) - var createStore = __webpack_require__(90) - - var addEvent = __webpack_require__(44) - var removeEvent = __webpack_require__(49) - var ProxyEvent = __webpack_require__(48) - - var HANDLER_STORE = createStore() - - module.exports = DOMDelegator - - function DOMDelegator(document) { - if (!(this instanceof DOMDelegator)) { - return new DOMDelegator(document); - } - - document = document || globalDocument - - this.target = document.documentElement - this.events = {} - this.rawEventListeners = {} - this.globalListeners = {} - } - - DOMDelegator.prototype.addEventListener = addEvent - DOMDelegator.prototype.removeEventListener = removeEvent - - DOMDelegator.allocateHandle = - function allocateHandle(func) { - var handle = new Handle() - - HANDLER_STORE(handle).func = func; - - return handle - } - - DOMDelegator.transformHandle = - function transformHandle(handle, broadcast) { - var func = HANDLER_STORE(handle).func - - return this.allocateHandle(function (ev) { - broadcast(ev, func); - }) - } - - DOMDelegator.prototype.addGlobalEventListener = - function addGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - if (listeners.indexOf(fn) === -1) { - listeners.push(fn) - } - - this.globalListeners[eventName] = listeners; - } - - DOMDelegator.prototype.removeGlobalEventListener = - function removeGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - - var index = listeners.indexOf(fn) - if (index !== -1) { - listeners.splice(index, 1) - } - } - - DOMDelegator.prototype.listenTo = function listenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - this.events[eventName]++; - - if (this.events[eventName] !== 1) { - return - } - - var listener = this.rawEventListeners[eventName] - if (!listener) { - listener = this.rawEventListeners[eventName] = - createHandler(eventName, this) - } - - this.target.addEventListener(eventName, listener, true) - } - - DOMDelegator.prototype.unlistenTo = function unlistenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - if (this.events[eventName] === 0) { - throw new Error("already unlistened to event."); - } - - this.events[eventName]--; - - if (this.events[eventName] !== 0) { - return - } - - var listener = this.rawEventListeners[eventName] - - if (!listener) { - throw new Error("dom-delegator#unlistenTo: cannot " + - "unlisten to " + eventName) - } - - this.target.removeEventListener(eventName, listener, true) - } - - function createHandler(eventName, delegator) { - var globalListeners = delegator.globalListeners; - var delegatorTarget = delegator.target; - - return handler - - function handler(ev) { - var globalHandlers = globalListeners[eventName] || [] - - if (globalHandlers.length > 0) { - var globalEvent = new ProxyEvent(ev); - globalEvent.currentTarget = delegatorTarget; - callListeners(globalHandlers, globalEvent) - } - - findAndInvokeListeners(ev.target, ev, eventName) - } - } - - function findAndInvokeListeners(elem, ev, eventName) { - var listener = getListener(elem, eventName) - - if (listener && listener.handlers.length > 0) { - var listenerEvent = new ProxyEvent(ev); - listenerEvent.currentTarget = listener.currentTarget - callListeners(listener.handlers, listenerEvent) - - if (listenerEvent._bubbles) { - var nextTarget = listener.currentTarget.parentNode - findAndInvokeListeners(nextTarget, ev, eventName) - } - } - } - - function getListener(target, type) { - // terminate recursion if parent is `null` - if (target === null || typeof target === "undefined") { - return null - } - - var events = EvStore(target) - // fetch list of handler fns for this event - var handler = events[type] - var allHandler = events.event - - if (!handler && !allHandler) { - return getListener(target.parentNode, type) - } - - var handlers = [].concat(handler || [], allHandler || []) - return new Listener(target, handlers) - } - - function callListeners(handlers, ev) { - handlers.forEach(function (handler) { - if (typeof handler === "function") { - handler(ev) - } else if (typeof handler.handleEvent === "function") { - handler.handleEvent(ev) - } else if (handler.type === "dom-delegator-handle") { - HANDLER_STORE(handler).func(ev) - } else { - throw new Error("dom-delegator: unknown handler " + - "found: " + JSON.stringify(handlers)); - } - }) - } - - function Listener(target, handlers) { - this.currentTarget = target - this.handlers = handlers - } - - function Handle() { - this.type = "dom-delegator-handle" - } - - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - var Individual = __webpack_require__(47) - var cuid = __webpack_require__(42) - var globalDocument = __webpack_require__(14) - - var DOMDelegator = __webpack_require__(45) - - var versionKey = "13" - var cacheKey = "__DOM_DELEGATOR_CACHE@" + versionKey - var cacheTokenKey = "__DOM_DELEGATOR_CACHE_TOKEN@" + versionKey - var delegatorCache = Individual(cacheKey, { - delegators: {} - }) - var commonEvents = [ - "blur", "change", "click", "contextmenu", "dblclick", - "error","focus", "focusin", "focusout", "input", "keydown", - "keypress", "keyup", "load", "mousedown", "mouseup", - "resize", "select", "submit", "touchcancel", - "touchend", "touchstart", "unload" - ] - - /* Delegator is a thin wrapper around a singleton `DOMDelegator` - instance. - - Only one DOMDelegator should exist because we do not want - duplicate event listeners bound to the DOM. - - `Delegator` will also `listenTo()` all events unless - every caller opts out of it - */ - module.exports = Delegator - - function Delegator(opts) { - opts = opts || {} - var document = opts.document || globalDocument - - var cacheKey = document[cacheTokenKey] - - if (!cacheKey) { - cacheKey = - document[cacheTokenKey] = cuid() - } - - var delegator = delegatorCache.delegators[cacheKey] - - if (!delegator) { - delegator = delegatorCache.delegators[cacheKey] = - new DOMDelegator(document) - } - - if (opts.defaultEvents !== false) { - for (var i = 0; i < commonEvents.length; i++) { - delegator.listenTo(commonEvents[i]) - } - } - - return delegator - } - - Delegator.allocateHandle = DOMDelegator.allocateHandle; - Delegator.transformHandle = DOMDelegator.transformHandle; - - -/***/ }, -/* 47 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {var root = typeof window !== 'undefined' ? - window : typeof global !== 'undefined' ? - global : {}; - - module.exports = Individual - - function Individual(key, value) { - if (root[key]) { - return root[key] - } - - Object.defineProperty(root, key, { - value: value - , configurable: true - }) - - return value - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - var inherits = __webpack_require__(65) - - var ALL_PROPS = [ - "altKey", "bubbles", "cancelable", "ctrlKey", - "eventPhase", "metaKey", "relatedTarget", "shiftKey", - "target", "timeStamp", "type", "view", "which" - ] - var KEY_PROPS = ["char", "charCode", "key", "keyCode"] - var MOUSE_PROPS = [ - "button", "buttons", "clientX", "clientY", "layerX", - "layerY", "offsetX", "offsetY", "pageX", "pageY", - "screenX", "screenY", "toElement" - ] - - var rkeyEvent = /^key|input/ - var rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/ - - module.exports = ProxyEvent - - function ProxyEvent(ev) { - if (!(this instanceof ProxyEvent)) { - return new ProxyEvent(ev) - } - - if (rkeyEvent.test(ev.type)) { - return new KeyEvent(ev) - } else if (rmouseEvent.test(ev.type)) { - return new MouseEvent(ev) - } - - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - this._rawEvent = ev - this._bubbles = false; - } - - ProxyEvent.prototype.preventDefault = function () { - this._rawEvent.preventDefault() - } - - ProxyEvent.prototype.startPropagation = function () { - this._bubbles = true; - } - - function MouseEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < MOUSE_PROPS.length; j++) { - var mousePropKey = MOUSE_PROPS[j] - this[mousePropKey] = ev[mousePropKey] - } - - this._rawEvent = ev - } - - inherits(MouseEvent, ProxyEvent) - - function KeyEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < KEY_PROPS.length; j++) { - var keyPropKey = KEY_PROPS[j] - this[keyPropKey] = ev[keyPropKey] - } - - this._rawEvent = ev - } - - inherits(KeyEvent, ProxyEvent) - - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = removeEvent - - function removeEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - return - } else if (Array.isArray(event)) { - var index = event.indexOf(handler) - if (index !== -1) { - event.splice(index, 1) - } - } else if (event === handler) { - events[type] = null - } - } - - -/***/ }, -/* 50 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(51)() + module.exports = __webpack_require__(42)() ? Object.assign - : __webpack_require__(52); + : __webpack_require__(43); /***/ }, -/* 51 */ +/* 42 */ /***/ function(module, exports) { 'use strict'; @@ -4841,13 +4297,13 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 52 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keys = __webpack_require__(54) - , value = __webpack_require__(59) + var keys = __webpack_require__(45) + , value = __webpack_require__(50) , max = Math.max; @@ -4869,7 +4325,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 53 */ +/* 44 */ /***/ function(module, exports) { // Deprecated @@ -4880,18 +4336,18 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 54 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(55)() + module.exports = __webpack_require__(46)() ? Object.keys - : __webpack_require__(56); + : __webpack_require__(47); /***/ }, -/* 55 */ +/* 46 */ /***/ function(module, exports) { 'use strict'; @@ -4905,7 +4361,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 56 */ +/* 47 */ /***/ function(module, exports) { 'use strict'; @@ -4918,7 +4374,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 57 */ +/* 48 */ /***/ function(module, exports) { 'use strict'; @@ -4941,7 +4397,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 58 */ +/* 49 */ /***/ function(module, exports) { 'use strict'; @@ -4953,7 +4409,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 59 */ +/* 50 */ /***/ function(module, exports) { 'use strict'; @@ -4965,18 +4421,18 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 60 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(61)() + module.exports = __webpack_require__(52)() ? String.prototype.contains - : __webpack_require__(62); + : __webpack_require__(53); /***/ }, -/* 61 */ +/* 52 */ /***/ function(module, exports) { 'use strict'; @@ -4990,7 +4446,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 62 */ +/* 53 */ /***/ function(module, exports) { 'use strict'; @@ -5003,7 +4459,33 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 63 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var OneVersionConstraint = __webpack_require__(56); + + var MY_VERSION = '7'; + OneVersionConstraint('ev-store', MY_VERSION); + + var hashKey = '__EV_STORE_KEY@' + MY_VERSION; + + module.exports = EvStore; + + function EvStore(elem) { + var hash = elem[hashKey]; + + if (!hash) { + hash = elem[hashKey] = {}; + } + + return hash; + } + + +/***/ }, +/* 55 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {'use strict'; @@ -5029,12 +4511,12 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 64 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Individual = __webpack_require__(63); + var Individual = __webpack_require__(55); module.exports = OneVersion; @@ -5057,36 +4539,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 65 */ -/***/ function(module, exports) { - - if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } - - -/***/ }, -/* 66 */ +/* 57 */ /***/ function(module, exports) { /** @@ -5140,7 +4593,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 67 */ +/* 58 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5586,7 +5039,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 68 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5597,8 +5050,8 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keysIn = __webpack_require__(72), - rest = __webpack_require__(10); + var keysIn = __webpack_require__(63), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -5940,7 +5393,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 69 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5951,8 +5404,8 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var assignInWith = __webpack_require__(68), - rest = __webpack_require__(10); + var assignInWith = __webpack_require__(59), + rest = __webpack_require__(9); /** * A faster alternative to `Function#apply`, this function invokes `func` @@ -6062,7 +5515,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 70 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6073,8 +5526,8 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseFor = __webpack_require__(66), - keys = __webpack_require__(71); + var baseFor = __webpack_require__(57), + keys = __webpack_require__(62); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. @@ -6152,9 +5605,9 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 71 */ -67, -/* 72 */ +/* 62 */ +58, +/* 63 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -6606,7 +6059,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 73 */ +/* 64 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) { @@ -6644,7 +6097,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 74 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { // uuid.js @@ -6655,7 +6108,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { // Unique ID creation requires a high quality random # generator. We feature // detect to determine the best RNG source, normalizing to a function that // returns 128-bits of randomness, since that's what's usually required - var _rng = __webpack_require__(73); + var _rng = __webpack_require__(64); // Maps for number <-> hex string conversion var _byteToHex = []; @@ -6833,34 +6286,34 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 75 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { - var createElement = __webpack_require__(21) + var createElement = __webpack_require__(19) module.exports = createElement /***/ }, -/* 76 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { - var diff = __webpack_require__(89) + var diff = __webpack_require__(80) module.exports = diff /***/ }, -/* 77 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { - var patch = __webpack_require__(80) + var patch = __webpack_require__(71) module.exports = patch /***/ }, -/* 78 */ +/* 69 */ /***/ function(module, exports) { // Maps a virtual DOM tree onto a real DOM tree in an efficient manner. @@ -6951,15 +6404,15 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 79 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isWidget = __webpack_require__(2) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) - var updateWidget = __webpack_require__(81) + var updateWidget = __webpack_require__(72) module.exports = applyPatch @@ -7108,15 +6561,15 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 80 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) - var isArray = __webpack_require__(12) + var document = __webpack_require__(17) + var isArray = __webpack_require__(11) - var render = __webpack_require__(21) - var domIndex = __webpack_require__(78) - var patchOp = __webpack_require__(79) + var render = __webpack_require__(19) + var domIndex = __webpack_require__(69) + var patchOp = __webpack_require__(70) module.exports = patch function patch(rootNode, patches, renderOptions) { @@ -7194,7 +6647,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 81 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { var isWidget = __webpack_require__(2) @@ -7215,12 +6668,12 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 82 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var EvStore = __webpack_require__(5); + var EvStore = __webpack_require__(54); module.exports = EvHook; @@ -7248,7 +6701,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 83 */ +/* 74 */ /***/ function(module, exports) { 'use strict'; @@ -7271,24 +6724,24 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 84 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var isArray = __webpack_require__(12); + var isArray = __webpack_require__(11); - var VNode = __webpack_require__(86); - var VText = __webpack_require__(87); + var VNode = __webpack_require__(77); + var VText = __webpack_require__(78); var isVNode = __webpack_require__(3); - var isVText = __webpack_require__(8); + var isVText = __webpack_require__(7); var isWidget = __webpack_require__(2); - var isHook = __webpack_require__(7); - var isVThunk = __webpack_require__(6); + var isHook = __webpack_require__(6); + var isVThunk = __webpack_require__(5); - var parseTag = __webpack_require__(85); - var softSetHook = __webpack_require__(83); - var evHook = __webpack_require__(82); + var parseTag = __webpack_require__(76); + var softSetHook = __webpack_require__(74); + var evHook = __webpack_require__(73); module.exports = h; @@ -7414,12 +6867,12 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 85 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var split = __webpack_require__(41); + var split = __webpack_require__(39); var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/; var notClassId = /^\.|#/; @@ -7474,14 +6927,14 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 86 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) var isVNode = __webpack_require__(3) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var isVHook = __webpack_require__(7) + var isThunk = __webpack_require__(5) + var isVHook = __webpack_require__(6) module.exports = VirtualNode @@ -7552,7 +7005,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 87 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -7568,11 +7021,11 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 88 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = diffProps @@ -7632,19 +7085,19 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(12) + var isArray = __webpack_require__(11) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var handleThunk = __webpack_require__(22) + var isThunk = __webpack_require__(5) + var handleThunk = __webpack_require__(20) - var diffProps = __webpack_require__(88) + var diffProps = __webpack_require__(79) module.exports = diff @@ -8065,54 +7518,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { /***/ }, -/* 90 */ -/***/ function(module, exports, __webpack_require__) { - - var hiddenStore = __webpack_require__(91); - - module.exports = createStore; - - function createStore() { - var key = {}; - - return function (obj) { - if ((typeof obj !== 'object' || obj === null) && - typeof obj !== 'function' - ) { - throw new Error('Weakmap-shim: Key must be object') - } - - var store = obj.valueOf(key); - return store && store.identity === key ? - store : hiddenStore(obj, key); - }; - } - - -/***/ }, -/* 91 */ -/***/ function(module, exports) { - - module.exports = hiddenStore; - - function hiddenStore(obj, key) { - var store = { identity: key }; - var valueOf = obj.valueOf; - - Object.defineProperty(obj, "valueOf", { - value: function (value) { - return value !== key ? - valueOf.apply(this, arguments) : store; - }, - writable: true - }); - - return store; - } - - -/***/ }, -/* 92 */ +/* 81 */ /***/ function(module, exports) { 'use strict'; @@ -8268,7 +7674,7 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { }; /***/ }, -/* 93 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { module.exports = function() { @@ -8276,34 +7682,10 @@ define("WaveformPlaylist", [], function() { return /******/ (function(modules) { }; /***/ }, -/* 94 */ +/* 83 */ /***/ function(module, exports) { /* (ignored) */ -/***/ }, -/* 95 */ -94, -/* 96 */ -/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { - - /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : - typeof window !== 'undefined' ? window : {} - var minDoc = __webpack_require__(__webpack_module_template_argument_0__); - - if (typeof document !== 'undefined') { - module.exports = document; - } else { - var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } - - module.exports = doccy; - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - /***/ } /******/ ])))});; \ No newline at end of file diff --git a/dist/js/waveform-playlist.amd.min.js b/dist/js/waveform-playlist.amd.min.js index 2a35a660..20460c89 100644 --- a/dist/js/waveform-playlist.amd.min.js +++ b/dist/js/waveform-playlist.amd.min.js @@ -1,8 +1,8 @@ -define("WaveformPlaylist",[],function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?(0,h["default"])():arguments[1],r=arguments.length<=2||void 0===arguments[2]?(0,l["default"])():arguments[2];if(void 0===e.container)throw new Error("DOM element container must be given.");var i=new(window.AudioContext||window.webkitAudioContext),o={jsLocation:"js/",ac:i,sampleRate:i.sampleRate,samplesPerPixel:4096,mono:!0,fadeType:"logarithmic",timescale:!1,controls:{show:!1,width:150},colors:{waveOutlineColor:"white",timeColor:"grey",fadeColor:"black"},waveHeight:128,state:"cursor",zoomLevels:[512,1024,2048,4096]},s=(0,a["default"])(o,e),c=s.zoomLevels.indexOf(s.samplesPerPixel);if(-1===c)throw new Error("initial samplesPerPixel must be included in array zoomLevels");var f=new p["default"];f.setSampleRate(s.sampleRate),f.setSamplesPerPixel(s.samplesPerPixel),f.setAudioContext(s.ac),f.setEventEmitter(t),f.setUpEventEmitter(),f.setTimeSelection(0,0),f.setState(s.state),f.setControlOptions(s.controls),f.setWaveHeight(s.waveHeight),f.setColors(s.colors),f.setZoomLevels(s.zoomLevels),f.setZoomIndex(c),f.setMono(s.mono);var d=f.render(),v=(0,u["default"])(d);return s.container.appendChild(v),f.tree=d,f.rootNode=v,r.listenTo("scroll"),n.p=s.jsLocation,f}Object.defineProperty(t,"__esModule",{value:!0}),t.init=i;var o=n(18),a=r(o),s=n(75),u=r(s),c=n(46),l=r(c),f=n(15),h=r(f),d=n(24),p=r(d)},function(e,t){"use strict";function n(e,t){return e/t}function r(e,t){return Math.ceil(e*t)}function i(e,t){return~~(e/t)}function o(e,t){return~~(e*t)}function a(e,t,n){return e*t/n}function s(e,t,n){return Math.ceil(e*n/t)}Object.defineProperty(t,"__esModule",{value:!0}),t.samplesToSeconds=n,t.secondsToSamples=r,t.samplesToPixels=i,t.pixelsToSamples=o,t.pixelsToSeconds=a,t.secondsToPixels=s},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(64),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){function n(e){return e&&"Thunk"===e.type}e.exports=n},function(e,t){function n(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualText"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=(0,d.sCurve)(1e4,1);this.setValueCurveAtTime(n,e,t)}function i(e,t){var n=(0,d.sCurve)(1e4,-1);this.setValueCurveAtTime(n,e,t)}function o(e,t){this.linearRampToValueAtTime(0,e),this.linearRampToValueAtTime(1,e+t)}function a(e,t){this.linearRampToValueAtTime(1,e),this.linearRampToValueAtTime(0,e+t)}function s(e,t){this.exponentialRampToValueAtTime(.01,e),this.exponentialRampToValueAtTime(1,e+t)}function u(e,t){this.exponentialRampToValueAtTime(1,e),this.exponentialRampToValueAtTime(.01,e+t)}function c(e,t){var n=(0,d.logarithmic)(1e4,10,1);this.setValueCurveAtTime(n,e,t)}function l(e,t){var n=(0,d.logarithmic)(1e4,10,-1);this.setValueCurveAtTime(n,e,t)}function f(e,t,n,i){switch(t){case p:r.call(e,n,i);break;case v:o.call(e,n,i);break;case m:s.call(e,n,i);break;case y:c.call(e,n,i);break;default:throw new Error("Unsupported Fade type")}}function h(e,t,n,r){switch(t){case p:i.call(e,n,r);break;case v:a.call(e,n,r);break;case m:u.call(e,n,r);break;case y:l.call(e,n,r);break;default:throw new Error("Unsupported Fade type")}}Object.defineProperty(t,"__esModule",{value:!0}),t.FADEOUT=t.FADEIN=t.LOGARITHMIC=t.EXPONENTIAL=t.LINEAR=t.SCURVE=void 0,t.createFadeIn=f,t.createFadeOut=h;var d=n(16),p=t.SCURVE="sCurve",v=t.LINEAR="linear",m=t.EXPONENTIAL="exponential",y=t.LOGARITHMIC="logarithmic";t.FADEIN="FadeIn",t.FADEOUT="FadeOut"},function(e,t){(function(t){function n(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){if("function"!=typeof e)throw new TypeError(u);return t=w(void 0===t?e.length-1:a(t),0),function(){for(var r=arguments,i=-1,o=w(r.length-t,0),a=Array(o);++ie?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,b=t.Object.prototype,k=b.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(84);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;n>t;++t)o[t-1]=arguments[t];h.call(i,this,o)}},s={on:r,once:i,off:o,emit:a},u={on:l(r),once:l(i),off:l(o),emit:l(a)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,o=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,i=t>0?n:e-1-n,o[i]=Math.exp(2*r-1)/Math.exp(1);return o}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function o(e,t,n){var r,i,o=new Float32Array(e),a=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,a=i/e,o[r]=Math.log(1+t*a)/Math.log(1+t);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=o},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!x.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&c(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(67),m=n(10),y=9007199254740991,g="[object Function]",b="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,x=w.hasOwnProperty,P=w.toString,T=o("length"),O=u(function(e,t){a(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},[96,95],function(e,t,n){function r(e,t,n){for(var r in t){var a=t[r];void 0===a?i(e,r,a,n):u(a)?(i(e,r,a,n),a.hook&&a.hook(e,r,n?n[r]:void 0)):s(a)?o(e,t,n,r,a):e[r]=a}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var o in i)e.removeAttribute(o);else if("style"===t)for(var a in i)e.style[a]="";else"string"==typeof i?e[t]="":e[t]=null}}function o(e,t,n,r,i){var o=n?n[r]:void 0;if("attributes"!==r){if(o&&s(o)&&a(o)!==a(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function a(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(17),u=n(7);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!a(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;o(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,void 0))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),o=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.tracks.forEach(function(i){i.setState("cursor"),o.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=o,this.startAnimation(e),Promise.all(this.playoutPromises)}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},"ev-scroll":function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,a.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,a.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},o=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(o.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[o,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var o=n>e?n:e,a=t>r?r:t;this.setCues(o+i,a+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(P.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(P.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,o,a,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,o=Math.min(f,this.duration)):o=this.duration):(i=t-this.startTime,o=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,a=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(at.start&&a1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),o=n.getEvents();Object.keys(o).map(function(e){r["ev-"+e]=o[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{"ev-click":function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{"ev-click":function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},"ev-input":function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),o=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),a=0,s=this.peaks.data.length;r>0&&r>i&&(a=o>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var o=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+a+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);o.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new k["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new x["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new x["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},o)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var o=Math.abs(r*t),a=Math.abs(i*t);e.fillRect(n,0,1,t-a),e.fillRect(n,t+o,1,t-o)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(a,s,i,c,l)}}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function o(e,t,n,r,o){var a=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",a=i(t,n,r),c=o-a[0]*o,e.beginPath(),e.moveTo(0,c),s=1,u=a.length;u>s;s++)c=o-a[s]*o,e.lineTo(s,c);e.stroke()}var a=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&ne?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(a(e)){var t=i(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,k=t.Object.prototype,b=k.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(75);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt;++t)a[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,a)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,a=new Array(n-1),t=1;n>t;++t)a[t-1]=arguments[t];h.call(i,this,a)}},s={on:r,once:i,off:a,emit:o},u={on:l(r),once:l(i),off:l(a),emit:l(o)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,a=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,i=t>0?n:e-1-n,a[i]=Math.exp(2*r-1)/Math.exp(1);return a}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function a(e,t,n){var r,i,a=new Float32Array(e),o=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,o=i/e,a[r]=Math.log(1+t*o)/Math.log(1+t);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=a},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!P.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&c(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(58),m=n(9),y=9007199254740991,g="[object Function]",k="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,P=w.hasOwnProperty,x=w.toString,T=a("length"),O=u(function(e,t){o(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(83);if("undefined"!=typeof document)e.exports=document;else{var a=r["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=a}}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){for(var r in t){var o=t[r];void 0===o?i(e,r,o,n):u(o)?(i(e,r,o,n),o.hook&&o.hook(e,r,n?n[r]:void 0)):s(o)?a(e,t,n,r,o):e[r]=o}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var a in i)e.removeAttribute(a);else if("style"===t)for(var o in i)e.style[o]="";else"string"==typeof i?e[t]="":e[t]=null}}function a(e,t,n,r,i){var a=n?n[r]:void 0;if("attributes"!==r){if(a&&s(a)&&o(a)!==o(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function o(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(15),u=n(6);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!o(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;a(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e,t){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,t))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),a=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.isPlaying()?void this.restartPlayFrom(e,t):(this.tracks.forEach(function(i){i.setState("cursor"),a.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=a,this.startAnimation(e),Promise.all(this.playoutPromises))}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},onscroll:function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,o.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,o.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},a=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(a.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[a,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var a=n>e?n:e,o=t>r?r:t;this.setCues(a+i,o+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(x.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(x.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,a,o,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,a=Math.min(f,this.duration)):a=this.duration):(i=t-this.startTime,a=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,o=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0; +if(ot.start&&o1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),a=n.getEvents();Object.keys(a).map(function(e){r["on"+e]=a[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{onclick:function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{onclick:function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},oninput:function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),a=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),o=0,s=this.peaks.data.length;r>0&&r>i&&(o=a>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var a=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+o+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);a.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new b["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new P["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new P["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},a)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var a=Math.abs(r*t),o=Math.abs(i*t);e.fillRect(n,0,1,t-o),e.fillRect(n,t+a,1,t-a)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(o,s,i,c,l)}}}]),e}();t["default"]=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function a(e,t,n,r,a){var o=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",o=i(t,n,r),c=a-o[0]*a,e.beginPath(),e.moveTo(0,c),s=1,u=o.length;u>s;s++)c=a-o[s]*a,e.lineTo(s,c);e.stroke()}var o=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&n * Available under the MIT License * ECMAScript compliant, uniform cross-browser split method */ -e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(a,function(){for(var t=1;t1&&s.index=o)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>o?l.slice(0,o):l}}()},function(e,t,n){!function(t){"use strict";var n="cuid",r=0,i=4,o=36,a=Math.pow(o,i),s=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},u=function(){return s((Math.random()*a<<0).toString(o),i)},c=function(){return r=a>r?r:0,r++,r-1},l=function(){var e,t="c",n=(new Date).getTime().toString(o),r=l.fingerprint(),a=u()+u();return e=s(c().toString(o),i),t+n+e+r+a};l.slug=function(){var e,t=(new Date).getTime().toString(36),n=l.fingerprint().slice(0,1)+l.fingerprint().slice(-1),r=u().slice(-2);return e=c().toString(36).slice(-4),t.slice(-2)+e+n+r},l.globalCount=function(){var e=function(){var e,t=0;for(e in window)t++;return t}();return l.globalCount=function(){return e},e},l.fingerprint=function(){return s((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+l.globalCount().toString(36),4)},t.register?t.register(n,l):e.exports=l}(this.applitude||this)},function(e,t,n){"use strict";var r,i=n(50),o=n(57),a=n(53),s=n(60);r=e.exports=function(e,t){var n,r,a,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=a=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),a=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:a},u?i(o(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:a(t)?null==n?n=void 0:a(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(o(c),l):l}},function(e,t,n){function r(e,t,n){var r=i(e),o=r[t];o?Array.isArray(o)?-1===o.indexOf(n)&&o.push(n):o!==n&&(r[t]=[o,n]):r[t]=n}var i=n(5);e.exports=r},function(e,t,n){function r(e){return this instanceof r?(e=e||l,this.target=e.documentElement,this.events={},this.rawEventListeners={},void(this.globalListeners={})):new r(e)}function i(e,t){function n(t){var n=r[e]||[];if(n.length>0){var a=new v(t);a.currentTarget=i,s(n,a)}o(t.target,t,e)}var r=t.globalListeners,i=t.target;return n}function o(e,t,n){var r=a(e,n);if(r&&r.handlers.length>0){var i=new v(t);if(i.currentTarget=r.currentTarget,s(r.handlers,i),i._bubbles){var u=r.currentTarget.parentNode;o(u,t,n)}}}function a(e,t){if(null===e||"undefined"==typeof e)return null;var n=f(e),r=n[t],i=n.event;if(!r&&!i)return a(e.parentNode,t);var o=[].concat(r||[],i||[]);return new u(e,o)}function s(e,t){e.forEach(function(n){if("function"==typeof n)n(t);else if("function"==typeof n.handleEvent)n.handleEvent(t);else{if("dom-delegator-handle"!==n.type)throw new Error("dom-delegator: unknown handler found: "+JSON.stringify(e));m(n).func(t)}})}function u(e,t){this.currentTarget=e,this.handlers=t}function c(){this.type="dom-delegator-handle"}var l=n(14),f=n(5),h=n(90),d=n(44),p=n(49),v=n(48),m=h();e.exports=r,r.prototype.addEventListener=d,r.prototype.removeEventListener=p,r.allocateHandle=function(e){var t=new c;return m(t).func=e,t},r.transformHandle=function(e,t){var n=m(e).func;return this.allocateHandle(function(e){t(e,n)})},r.prototype.addGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[];-1===n.indexOf(t)&&n.push(t),this.globalListeners[e]=n},r.prototype.removeGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[],r=n.indexOf(t);-1!==r&&n.splice(r,1)},r.prototype.listenTo=function(e){if(e in this.events||(this.events[e]=0),this.events[e]++,1===this.events[e]){var t=this.rawEventListeners[e];t||(t=this.rawEventListeners[e]=i(e,this)),this.target.addEventListener(e,t,!0)}},r.prototype.unlistenTo=function(e){if(e in this.events||(this.events[e]=0),0===this.events[e])throw new Error("already unlistened to event.");if(this.events[e]--,0===this.events[e]){var t=this.rawEventListeners[e];if(!t)throw new Error("dom-delegator#unlistenTo: cannot unlisten to "+e);this.target.removeEventListener(e,t,!0)}}},function(e,t,n){function r(e){e=e||{};var t=e.document||a,n=t[l];n||(n=t[l]=o());var r=f.delegators[n];if(r||(r=f.delegators[n]=new s(t)),e.defaultEvents!==!1)for(var i=0;ia;++a)t=arguments[a],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(55)()?Object.keys:n(56)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(61)()?String.prototype.contains:n(62)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,o=r+"_ENFORCE_SINGLETON",a=i(o,t);if(a!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+a+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(63);e.exports=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function o(e){return j(Object(e))}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){var t=u(e);if(!t&&!l(e))return o(e);var n=s(e),a=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||a&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,b="[object Arguments]",k="[object Function]",w="[object GeneratorFunction]",x="[object String]",P=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,A=a("length"),R=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,k[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&u(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(72),v=n(10),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,k=t.Object.prototype,w=k.hasOwnProperty,x=k.toString,P=o("length"),T=s(function(e,t,n){a(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||o(e,u[n])&&!c.call(r,n)?t:e}function o(e,t){return e===t||e!==e&&t!==t}var a=n(68),s=n(10),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(a,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:a}function o(e,t){return e&&r(e,i(t))}function a(e){return e}var s=n(66),u=n(71);e.exports=o},67,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function o(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){for(var t=-1,n=u(e),i=o(e),a=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function o(e,t,n){var r=t&&n||0,o=t||[];e=e||{};var a=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(a=a+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=a,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;o[r++]=l>>>24&255,o[r++]=l>>>16&255,o[r++]=l>>>8&255,o[r++]=255&l;var f=s/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var m=e.node||h,y=0;6>y;y++)o[r+y]=m[y];return t?t:i(o)}function a(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;16>a;a++)t[r+a]=o[a];return t||i(o)}for(var s=n(73),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=a;m.v1=o,m.v4=a,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(21);e.exports=r},function(e,t,n){var r=n(89);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(o),r(e,t,n,i,0)):{}}function r(e,t,n,o,s){if(o=o||{},e){i(n,s,s)&&(o[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=o;){if(r=(a+o)/2>>0,i=e[r],o===a)return i>=t&&n>=i;if(t>i)o=r+1;else{if(!(i>n))return!0;a=r-1}}return!1}function o(e,t){return e>t?1:-1}var a={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return o(t,d,n);case p.VTEXT:return a(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function o(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function a(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var o=e.parentNode;i=r.render(n,r),o&&i!==e&&o.replaceChild(i,e)}return i}function s(e,t,n,r){var i,o=v(t,n);i=o?n.update(t,e)||e:r.render(n,r);var a=e.parentNode;return a&&i!==e&&a.replaceChild(i,e),o||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,o=r.render(n,r);return i&&o!==e&&i.replaceChild(o,e),o}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,o=e.childNodes,a={},s=0;s=u++?null:o[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(20),d=n(2),p=n(23),v=n(81);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=a(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;cb;b++){var k=n[b];o(k)?(d+=k.count||0,!p&&k.hasWidgets&&(p=!0),!v&&k.hasThunks&&(v=!0),m||!k.hooks&&!k.descendantHooks||(m=!0)):!p&&a(k)?"function"==typeof k.destroy&&(p=!0):!v&&s(k)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),o=n(3),a=n(2),s=n(6),u=n(7);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(o(u)&&o(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(a(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var o=n(17),a=n(7);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)k(e)||(a(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=P(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=o(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else b(t)?b(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):k(t)&&(k(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&a(e,n,r)}}function o(e,t,n,r,o){for(var a=e.children,s=h(a,t.children),u=s.children,c=a.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=a[d],m=u[d];o+=1,p?i(p,m,n,o):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(o+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function a(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(k(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,s(a,t,n),g(a)&&a.count&&(n+=a.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var o=x(e,t),a=r(o.a,o.b);c(a)&&(n[i]=new y(y.THUNK,null,a))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,l(a,t,n),g(a)&&a.count&&(n+=a.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var o=p(e),a=o.keys,s=o.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(b)}for(var k,w=u.slice(),x=0,P=[],T=[],O=0;Oi;i++){var o=e[i];o.key?t[o.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(12),y=n(23),g=n(3),b=n(8),k=n(2),w=n(6),x=n(22),P=n(88);e.exports=r},function(e,t,n){function r(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:i(t,e)}}var i=n(91);e.exports=r},function(e,t){function n(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}e.exports=n},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,o=e.length;o>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,o){if(t=t||1e4,o=o||8,n=n||!0,[8,16,32].indexOf(o)<0)throw new Error("Invalid number of bits specified for peaks.");var a,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(a=0;l>a;a++)u=e.getChannelData(a),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,o));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,o));return n&&f.length>1&&(f=makeMono(f,o)),s=f[0].length/2,{length:s,data:f,bits:o}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){},94,function(e,t,n,r){(function(t){var i="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},o=n(r);if("undefined"!=typeof document)e.exports=document;else{var a=i["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=a}}).call(t,function(){return this}())}]))}); \ No newline at end of file +e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,a){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,a);var o,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(o=new RegExp("^"+i.source+"$(?!\\s)",f)),a=a===e?-1>>>0:a>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(o,function(){for(var t=1;t1&&s.index=a)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>a?l.slice(0,a):l}}()},function(e,t,n){"use strict";var r,i=n(41),a=n(48),o=n(44),s=n(51);r=e.exports=function(e,t){var n,r,o,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=o=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),o=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:o},u?i(a(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:o(t)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(a(c),l):l}},function(e,t,n){"use strict";e.exports=n(42)()?Object.assign:n(43)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"!=typeof t?!1:(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(45),i=n(50),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},o=1;u>o;++o)t=arguments[o],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(46)()?Object.keys:n(47)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(52)()?String.prototype.contains:n(53)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";function r(e){var t=e[o];return t||(t=e[o]={}),t}var i=n(56),a="7";i("ev-store",a);var o="__EV_STORE_KEY@"+a;e.exports=r},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,a=r+"_ENFORCE_SINGLETON",o=i(a,t);if(o!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+o+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(55);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(n(a[u],u,a)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function a(e){return j(Object(e))}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){var t=u(e);if(!t&&!l(e))return a(e);var n=s(e),o=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||o&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,k="[object Arguments]",b="[object Function]",w="[object GeneratorFunction]",P="[object String]",x=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,R=o("length"),A=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,b[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&u(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(63),v=n(9),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,b=t.Object.prototype,w=b.hasOwnProperty,P=b.toString,x=a("length"),T=s(function(e,t,n){o(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||a(e,u[n])&&!c.call(r,n)?t:e}function a(e,t){return e===t||e!==e&&t!==t}var o=n(59),s=n(9),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(o,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:o}function a(e,t){return e&&r(e,i(t))}function o(e){return e}var s=n(57),u=n(62);e.exports=a},58,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){for(var t=-1,n=u(e),i=a(e),o=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function a(e,t,n){var r=t&&n||0,a=t||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(o=o+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=o,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;a[r++]=l>>>24&255,a[r++]=l>>>16&255,a[r++]=l>>>8&255,a[r++]=255&l;var f=s/4294967296*1e4&268435455;a[r++]=f>>>8&255,a[r++]=255&f,a[r++]=f>>>24&15|16,a[r++]=f>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=e.node||h,y=0;6>y;y++)a[r+y]=m[y];return t?t:i(a)}function o(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;16>o;o++)t[r+o]=a[o];return t||i(a)}for(var s=n(64),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=o;m.v1=a,m.v4=o,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(19);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t,n){var r=n(71);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(a),r(e,t,n,i,0)):{}}function r(e,t,n,a,s){if(a=a||{},e){i(n,s,s)&&(a[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=a;){if(r=(o+a)/2>>0,i=e[r],a===o)return i>=t&&n>=i;if(t>i)a=r+1;else{if(!(i>n))return!0;o=r-1}}return!1}function a(e,t){return e>t?1:-1}var o={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return a(t,d,n);case p.VTEXT:return o(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function a(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function o(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var a=e.parentNode;i=r.render(n,r),a&&i!==e&&a.replaceChild(i,e)}return i}function s(e,t,n,r){var i,a=v(t,n);i=a?n.update(t,e)||e:r.render(n,r);var o=e.parentNode;return o&&i!==e&&o.replaceChild(i,e),a||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,a=r.render(n,r);return i&&a!==e&&i.replaceChild(a,e),a}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,a=e.childNodes,o={},s=0;s=u++?null:a[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(18),d=n(2),p=n(21),v=n(72);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=o(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;ck;k++){var b=n[k];a(b)?(d+=b.count||0,!p&&b.hasWidgets&&(p=!0),!v&&b.hasThunks&&(v=!0),m||!b.hooks&&!b.descendantHooks||(m=!0)):!p&&o(b)?"function"==typeof b.destroy&&(p=!0):!v&&s(b)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),a=n(3),o=n(2),s=n(5),u=n(6);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(a(u)&&a(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(o(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var a=n(15),o=n(6);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)b(e)||(o(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=x(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=a(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else k(t)?k(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):b(t)&&(b(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&o(e,n,r)}}function a(e,t,n,r,a){for(var o=e.children,s=h(o,t.children),u=s.children,c=o.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=o[d],m=u[d];a+=1,p?i(p,m,n,a):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(a+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function o(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(b(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,s(o,t,n),g(o)&&o.count&&(n+=o.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var a=P(e,t),o=r(a.a,a.b);c(o)&&(n[i]=new y(y.THUNK,null,o))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,l(o,t,n),g(o)&&o.count&&(n+=o.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var a=p(e),o=a.keys,s=a.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(k)}for(var b,w=u.slice(),P=0,x=[],T=[],O=0;Oi;i++){var a=e[i];a.key?t[a.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(11),y=n(21),g=n(3),k=n(7),b=n(2),w=n(5),P=n(20),x=n(79);e.exports=r},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,a=e.length;a>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,a){if(t=t||1e4,a=a||8,n=n||!0,[8,16,32].indexOf(a)<0)throw new Error("Invalid number of bits specified for peaks.");var o,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(o=0;l>o;o++)u=e.getChannelData(o),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,a));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,a));return n&&f.length>1&&(f=makeMono(f,a)),s=f[0].length/2,{length:s,data:f,bits:a}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){}]))}); \ No newline at end of file diff --git a/dist/js/waveform-playlist.commonjs2.js b/dist/js/waveform-playlist.commonjs2.js index 9d4fc1a9..b841abe3 100644 --- a/dist/js/waveform-playlist.commonjs2.js +++ b/dist/js/waveform-playlist.commonjs2.js @@ -75,23 +75,19 @@ module.exports = }); exports.init = init; - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _createElement = __webpack_require__(75); + var _createElement = __webpack_require__(66); var _createElement2 = _interopRequireDefault(_createElement); - var _domDelegator = __webpack_require__(46); - - var _domDelegator2 = _interopRequireDefault(_domDelegator); - - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); - var _Playlist = __webpack_require__(24); + var _Playlist = __webpack_require__(22); var _Playlist2 = _interopRequireDefault(_Playlist); @@ -100,7 +96,6 @@ module.exports = function init() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var ee = arguments.length <= 1 || arguments[1] === undefined ? (0, _eventEmitter2.default)() : arguments[1]; - var delegator = arguments.length <= 2 || arguments[2] === undefined ? (0, _domDelegator2.default)() : arguments[2]; if (options.container === undefined) { throw new Error("DOM element container must be given."); @@ -160,9 +155,6 @@ module.exports = playlist.tree = tree; playlist.rootNode = rootNode; - //have to add extra events that aren't followed by default. - delegator.listenTo("scroll"); - __webpack_require__.p = config.jsLocation; return playlist; @@ -240,32 +232,6 @@ module.exports = /***/ }, /* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var OneVersionConstraint = __webpack_require__(64); - - var MY_VERSION = '7'; - OneVersionConstraint('ev-store', MY_VERSION); - - var hashKey = '__EV_STORE_KEY@' + MY_VERSION; - - module.exports = EvStore; - - function EvStore(elem) { - var hash = elem[hashKey]; - - if (!hash) { - hash = elem[hashKey] = {}; - } - - return hash; - } - - -/***/ }, -/* 6 */ /***/ function(module, exports) { module.exports = isThunk @@ -276,7 +242,7 @@ module.exports = /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { module.exports = isHook @@ -289,7 +255,7 @@ module.exports = /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -302,7 +268,7 @@ module.exports = /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -314,7 +280,7 @@ module.exports = exports.createFadeIn = createFadeIn; exports.createFadeOut = createFadeOut; - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); var SCURVE = exports.SCURVE = "sCurve"; var LINEAR = exports.LINEAR = "linear"; @@ -404,7 +370,7 @@ module.exports = /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -660,16 +626,16 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { - var h = __webpack_require__(84) + var h = __webpack_require__(75) module.exports = h /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports) { var nativeIsArray = Array.isArray @@ -683,7 +649,7 @@ module.exports = /***/ }, -/* 13 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -695,7 +661,7 @@ module.exports = }); exports.STATE_FINISHED = exports.STATE_DECODING = exports.STATE_LOADING = exports.STATE_UNINITIALIZED = undefined; - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); @@ -765,15 +731,13 @@ module.exports = exports.default = _class; /***/ }, -/* 14 */ -[96, 94], -/* 15 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var d = __webpack_require__(43) - , callable = __webpack_require__(58) + var d = __webpack_require__(40) + , callable = __webpack_require__(49) , apply = Function.prototype.apply, call = Function.prototype.call , create = Object.create, defineProperty = Object.defineProperty @@ -905,7 +869,7 @@ module.exports = /***/ }, -/* 16 */ +/* 14 */ /***/ function(module, exports) { 'use strict'; @@ -985,7 +949,7 @@ module.exports = /***/ }, -/* 17 */ +/* 15 */ /***/ function(module, exports) { "use strict"; @@ -996,7 +960,7 @@ module.exports = /***/ }, -/* 18 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -1007,8 +971,8 @@ module.exports = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keys = __webpack_require__(67), - rest = __webpack_require__(10); + var keys = __webpack_require__(58), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -1366,13 +1330,33 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 19 */ -[96, 95], -/* 20 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} + var minDoc = __webpack_require__(83); + + if (typeof document !== 'undefined') { + module.exports = document; + } else { + var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } + + module.exports = doccy; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = applyProperties @@ -1471,17 +1455,17 @@ module.exports = /***/ }, -/* 21 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) + var document = __webpack_require__(17) - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var handleThunk = __webpack_require__(22) + var handleThunk = __webpack_require__(20) module.exports = createElement @@ -1523,13 +1507,13 @@ module.exports = /***/ }, -/* 22 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) + var isThunk = __webpack_require__(5) module.exports = handleThunk @@ -1569,7 +1553,7 @@ module.exports = /***/ }, -/* 23 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -1597,7 +1581,7 @@ module.exports = /***/ }, -/* 24 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -1608,45 +1592,45 @@ module.exports = value: true }); - var _lodash = __webpack_require__(69); + var _lodash = __webpack_require__(60); var _lodash2 = _interopRequireDefault(_lodash); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _diff = __webpack_require__(76); + var _diff = __webpack_require__(67); var _diff2 = _interopRequireDefault(_diff); - var _patch = __webpack_require__(77); + var _patch = __webpack_require__(68); var _patch2 = _interopRequireDefault(_patch); var _conversions = __webpack_require__(1); - var _LoaderFactory = __webpack_require__(33); + var _LoaderFactory = __webpack_require__(31); var _LoaderFactory2 = _interopRequireDefault(_LoaderFactory); - var _ScrollHook = __webpack_require__(30); + var _ScrollHook = __webpack_require__(28); var _ScrollHook2 = _interopRequireDefault(_ScrollHook); - var _TimeScale = __webpack_require__(26); + var _TimeScale = __webpack_require__(24); var _TimeScale2 = _interopRequireDefault(_TimeScale); - var _Track = __webpack_require__(27); + var _Track = __webpack_require__(25); var _Track2 = _interopRequireDefault(_Track); - var _Playout = __webpack_require__(25); + var _Playout = __webpack_require__(23); var _Playout2 = _interopRequireDefault(_Playout); - var _recorderWorker = __webpack_require__(93); + var _recorderWorker = __webpack_require__(82); var _recorderWorker2 = _interopRequireDefault(_recorderWorker); @@ -2121,14 +2105,14 @@ module.exports = } }, { key: 'restartPlayFrom', - value: function restartPlayFrom(cursorPos) { + value: function restartPlayFrom(start, end) { this.stopAnimation(); this.tracks.forEach(function (editor) { editor.scheduleStop(); }); - return Promise.all(this.playoutPromises).then(this.play.bind(this, cursorPos, undefined)); + return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end)); } }, { key: 'play', @@ -2145,6 +2129,11 @@ module.exports = endTime = selected.end; } + if (this.isPlaying()) { + this.restartPlayFrom(startTime, endTime); + return; + } + this.tracks.forEach(function (track) { track.setState('cursor'); playoutPromises.push(track.schedulePlay(currentTime, startTime, endTime, { @@ -2338,7 +2327,7 @@ module.exports = "attributes": { "style": "overflow: auto;" }, - "ev-scroll": function evScroll(e) { + "onscroll": function onscroll(e) { _this12.scrollLeft = (0, _conversions.pixelsToSeconds)(e.target.scrollLeft, _this12.samplesPerPixel, _this12.sampleRate); _this12.ee.emit("scroll", _this12.scrollLeft); }, @@ -2364,7 +2353,7 @@ module.exports = exports.default = _class; /***/ }, -/* 25 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2375,7 +2364,7 @@ module.exports = value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2507,7 +2496,7 @@ module.exports = exports.default = _class; /***/ }, -/* 26 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2520,11 +2509,11 @@ module.exports = var _conversions = __webpack_require__(1); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _TimeScaleHook = __webpack_require__(31); + var _TimeScaleHook = __webpack_require__(29); var _TimeScaleHook2 = _interopRequireDefault(_TimeScaleHook); @@ -2691,7 +2680,7 @@ module.exports = exports.default = _class; /***/ }, -/* 27 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2702,41 +2691,41 @@ module.exports = value: true }); - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(70); + var _lodash3 = __webpack_require__(61); var _lodash4 = _interopRequireDefault(_lodash3); - var _uuid = __webpack_require__(74); + var _uuid = __webpack_require__(65); var _uuid2 = _interopRequireDefault(_uuid); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); var _conversions = __webpack_require__(1); - var _webaudioPeaks = __webpack_require__(92); + var _webaudioPeaks = __webpack_require__(81); var _webaudioPeaks2 = _interopRequireDefault(_webaudioPeaks); - var _states = __webpack_require__(35); + var _states = __webpack_require__(33); var _states2 = _interopRequireDefault(_states); - var _CanvasHook = __webpack_require__(28); + var _CanvasHook = __webpack_require__(26); var _CanvasHook2 = _interopRequireDefault(_CanvasHook); - var _FadeCanvasHook = __webpack_require__(29); + var _FadeCanvasHook = __webpack_require__(27); var _FadeCanvasHook2 = _interopRequireDefault(_FadeCanvasHook); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3088,7 +3077,7 @@ module.exports = var stateEvents = state.getEvents(); Object.keys(stateEvents).map(function (event) { - config['ev-' + event] = stateEvents[event].bind(state); + config['on' + event] = stateEvents[event].bind(state); }); stateClass = state.getClasses(); @@ -3109,9 +3098,9 @@ module.exports = return (0, _h2.default)("div.controls", { attributes: { "style": 'height: ' + numChan * data.height + 'px; width: ' + data.controls.width + 'px; position: absolute; left: 0; z-index: 10;' - } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "ev-click": function evClick() { + } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "onclick": function onclick() { _this3.ee.emit("mute", _this3); - } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "ev-click": function evClick() { + } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "onclick": function onclick() { _this3.ee.emit("solo", _this3); } }, ["Solo"])]), (0, _h2.default)("label", [(0, _h2.default)("input.volume-slider", { attributes: { @@ -3120,7 +3109,7 @@ module.exports = "max": 100, "value": 100 }, - "ev-input": function evInput(e) { + "oninput": function oninput(e) { _this3.ee.emit("volumechange", e.target.value, _this3); } })])]); @@ -3281,7 +3270,7 @@ module.exports = exports.default = _class; /***/ }, -/* 28 */ +/* 26 */ /***/ function(module, exports) { 'use strict'; @@ -3351,7 +3340,7 @@ module.exports = exports.default = _class; /***/ }, -/* 29 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3362,9 +3351,9 @@ module.exports = value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3445,7 +3434,7 @@ module.exports = exports.default = _class; /***/ }, -/* 30 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3486,7 +3475,7 @@ module.exports = exports.default = _class; /***/ }, -/* 31 */ +/* 29 */ /***/ function(module, exports) { 'use strict'; @@ -3543,7 +3532,7 @@ module.exports = exports.default = _class; /***/ }, -/* 32 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3556,7 +3545,7 @@ module.exports = value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3620,7 +3609,7 @@ module.exports = exports.default = _class; /***/ }, -/* 33 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3631,11 +3620,11 @@ module.exports = value: true }); - var _BlobLoader = __webpack_require__(32); + var _BlobLoader = __webpack_require__(30); var _BlobLoader2 = _interopRequireDefault(_BlobLoader); - var _XHRLoader = __webpack_require__(34); + var _XHRLoader = __webpack_require__(32); var _XHRLoader2 = _interopRequireDefault(_XHRLoader); @@ -3667,7 +3656,7 @@ module.exports = exports.default = _class; /***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3680,7 +3669,7 @@ module.exports = value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3742,7 +3731,7 @@ module.exports = exports.default = _class; /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3751,23 +3740,23 @@ module.exports = value: true }); - var _CursorState = __webpack_require__(36); + var _CursorState = __webpack_require__(34); var _CursorState2 = _interopRequireDefault(_CursorState); - var _SelectState = __webpack_require__(39); + var _SelectState = __webpack_require__(37); var _SelectState2 = _interopRequireDefault(_SelectState); - var _ShiftState = __webpack_require__(40); + var _ShiftState = __webpack_require__(38); var _ShiftState2 = _interopRequireDefault(_ShiftState); - var _FadeInState = __webpack_require__(37); + var _FadeInState = __webpack_require__(35); var _FadeInState2 = _interopRequireDefault(_FadeInState); - var _FadeOutState = __webpack_require__(38); + var _FadeOutState = __webpack_require__(36); var _FadeOutState2 = _interopRequireDefault(_FadeOutState); @@ -3782,7 +3771,7 @@ module.exports = }; /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3836,7 +3825,7 @@ module.exports = exports.default = _class; /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3890,7 +3879,7 @@ module.exports = exports.default = _class; /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3944,7 +3933,7 @@ module.exports = exports.default = _class; /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4027,7 +4016,7 @@ module.exports = exports.default = _class; /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4102,7 +4091,7 @@ module.exports = exports.default = _class; /***/ }, -/* 41 */ +/* 39 */ /***/ function(module, exports) { /*! @@ -4214,131 +4203,15 @@ module.exports = /***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * cuid.js - * Collision-resistant UID generator for browsers and node. - * Sequential for fast db lookups and recency sorting. - * Safe for element IDs and server-side lookups. - * - * Extracted from CLCTR - * - * Copyright (c) Eric Elliott 2012 - * MIT License - */ - - /*global window, navigator, document, require, process, module */ - (function (app) { - 'use strict'; - var namespace = 'cuid', - c = 0, - blockSize = 4, - base = 36, - discreteValues = Math.pow(base, blockSize), - - pad = function pad(num, size) { - var s = "000000000" + num; - return s.substr(s.length-size); - }, - - randomBlock = function randomBlock() { - return pad((Math.random() * - discreteValues << 0) - .toString(base), blockSize); - }, - - safeCounter = function () { - c = (c < discreteValues) ? c : 0; - c++; // this is not subliminal - return c - 1; - }, - - api = function cuid() { - // Starting with a lowercase letter makes - // it HTML element ID friendly. - var letter = 'c', // hard-coded allows for sequential access - - // timestamp - // warning: this exposes the exact date and time - // that the uid was created. - timestamp = (new Date().getTime()).toString(base), - - // Prevent same-machine collisions. - counter, - - // A few chars to generate distinct ids for different - // clients (so different computers are far less - // likely to generate the same id) - fingerprint = api.fingerprint(), - - // Grab some more chars from Math.random() - random = randomBlock() + randomBlock(); - - counter = pad(safeCounter().toString(base), blockSize); - - return (letter + timestamp + counter + fingerprint + random); - }; - - api.slug = function slug() { - var date = new Date().getTime().toString(36), - counter, - print = api.fingerprint().slice(0,1) + - api.fingerprint().slice(-1), - random = randomBlock().slice(-2); - - counter = safeCounter().toString(36).slice(-4); - - return date.slice(-2) + - counter + print + random; - }; - - api.globalCount = function globalCount() { - // We want to cache the results of this - var cache = (function calc() { - var i, - count = 0; - - for (i in window) { - count++; - } - - return count; - }()); - - api.globalCount = function () { return cache; }; - return cache; - }; - - api.fingerprint = function browserPrint() { - return pad((navigator.mimeTypes.length + - navigator.userAgent.length).toString(36) + - api.globalCount().toString(36), 4); - }; - - // don't change anything from here down. - if (app.register) { - app.register(namespace, api); - } else if (true) { - module.exports = api; - } else { - app[namespace] = api; - } - - }(this.applitude || this)); - - -/***/ }, -/* 43 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var assign = __webpack_require__(50) - , normalizeOpts = __webpack_require__(57) - , isCallable = __webpack_require__(53) - , contains = __webpack_require__(60) + var assign = __webpack_require__(41) + , normalizeOpts = __webpack_require__(48) + , isCallable = __webpack_require__(44) + , contains = __webpack_require__(51) , d; @@ -4399,435 +4272,18 @@ module.exports = /***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = addEvent - - function addEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - events[type] = handler - } else if (Array.isArray(event)) { - if (event.indexOf(handler) === -1) { - event.push(handler) - } - } else if (event !== handler) { - events[type] = [event, handler] - } - } - - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - var globalDocument = __webpack_require__(14) - var EvStore = __webpack_require__(5) - var createStore = __webpack_require__(90) - - var addEvent = __webpack_require__(44) - var removeEvent = __webpack_require__(49) - var ProxyEvent = __webpack_require__(48) - - var HANDLER_STORE = createStore() - - module.exports = DOMDelegator - - function DOMDelegator(document) { - if (!(this instanceof DOMDelegator)) { - return new DOMDelegator(document); - } - - document = document || globalDocument - - this.target = document.documentElement - this.events = {} - this.rawEventListeners = {} - this.globalListeners = {} - } - - DOMDelegator.prototype.addEventListener = addEvent - DOMDelegator.prototype.removeEventListener = removeEvent - - DOMDelegator.allocateHandle = - function allocateHandle(func) { - var handle = new Handle() - - HANDLER_STORE(handle).func = func; - - return handle - } - - DOMDelegator.transformHandle = - function transformHandle(handle, broadcast) { - var func = HANDLER_STORE(handle).func - - return this.allocateHandle(function (ev) { - broadcast(ev, func); - }) - } - - DOMDelegator.prototype.addGlobalEventListener = - function addGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - if (listeners.indexOf(fn) === -1) { - listeners.push(fn) - } - - this.globalListeners[eventName] = listeners; - } - - DOMDelegator.prototype.removeGlobalEventListener = - function removeGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - - var index = listeners.indexOf(fn) - if (index !== -1) { - listeners.splice(index, 1) - } - } - - DOMDelegator.prototype.listenTo = function listenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - this.events[eventName]++; - - if (this.events[eventName] !== 1) { - return - } - - var listener = this.rawEventListeners[eventName] - if (!listener) { - listener = this.rawEventListeners[eventName] = - createHandler(eventName, this) - } - - this.target.addEventListener(eventName, listener, true) - } - - DOMDelegator.prototype.unlistenTo = function unlistenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - if (this.events[eventName] === 0) { - throw new Error("already unlistened to event."); - } - - this.events[eventName]--; - - if (this.events[eventName] !== 0) { - return - } - - var listener = this.rawEventListeners[eventName] - - if (!listener) { - throw new Error("dom-delegator#unlistenTo: cannot " + - "unlisten to " + eventName) - } - - this.target.removeEventListener(eventName, listener, true) - } - - function createHandler(eventName, delegator) { - var globalListeners = delegator.globalListeners; - var delegatorTarget = delegator.target; - - return handler - - function handler(ev) { - var globalHandlers = globalListeners[eventName] || [] - - if (globalHandlers.length > 0) { - var globalEvent = new ProxyEvent(ev); - globalEvent.currentTarget = delegatorTarget; - callListeners(globalHandlers, globalEvent) - } - - findAndInvokeListeners(ev.target, ev, eventName) - } - } - - function findAndInvokeListeners(elem, ev, eventName) { - var listener = getListener(elem, eventName) - - if (listener && listener.handlers.length > 0) { - var listenerEvent = new ProxyEvent(ev); - listenerEvent.currentTarget = listener.currentTarget - callListeners(listener.handlers, listenerEvent) - - if (listenerEvent._bubbles) { - var nextTarget = listener.currentTarget.parentNode - findAndInvokeListeners(nextTarget, ev, eventName) - } - } - } - - function getListener(target, type) { - // terminate recursion if parent is `null` - if (target === null || typeof target === "undefined") { - return null - } - - var events = EvStore(target) - // fetch list of handler fns for this event - var handler = events[type] - var allHandler = events.event - - if (!handler && !allHandler) { - return getListener(target.parentNode, type) - } - - var handlers = [].concat(handler || [], allHandler || []) - return new Listener(target, handlers) - } - - function callListeners(handlers, ev) { - handlers.forEach(function (handler) { - if (typeof handler === "function") { - handler(ev) - } else if (typeof handler.handleEvent === "function") { - handler.handleEvent(ev) - } else if (handler.type === "dom-delegator-handle") { - HANDLER_STORE(handler).func(ev) - } else { - throw new Error("dom-delegator: unknown handler " + - "found: " + JSON.stringify(handlers)); - } - }) - } - - function Listener(target, handlers) { - this.currentTarget = target - this.handlers = handlers - } - - function Handle() { - this.type = "dom-delegator-handle" - } - - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - var Individual = __webpack_require__(47) - var cuid = __webpack_require__(42) - var globalDocument = __webpack_require__(14) - - var DOMDelegator = __webpack_require__(45) - - var versionKey = "13" - var cacheKey = "__DOM_DELEGATOR_CACHE@" + versionKey - var cacheTokenKey = "__DOM_DELEGATOR_CACHE_TOKEN@" + versionKey - var delegatorCache = Individual(cacheKey, { - delegators: {} - }) - var commonEvents = [ - "blur", "change", "click", "contextmenu", "dblclick", - "error","focus", "focusin", "focusout", "input", "keydown", - "keypress", "keyup", "load", "mousedown", "mouseup", - "resize", "select", "submit", "touchcancel", - "touchend", "touchstart", "unload" - ] - - /* Delegator is a thin wrapper around a singleton `DOMDelegator` - instance. - - Only one DOMDelegator should exist because we do not want - duplicate event listeners bound to the DOM. - - `Delegator` will also `listenTo()` all events unless - every caller opts out of it - */ - module.exports = Delegator - - function Delegator(opts) { - opts = opts || {} - var document = opts.document || globalDocument - - var cacheKey = document[cacheTokenKey] - - if (!cacheKey) { - cacheKey = - document[cacheTokenKey] = cuid() - } - - var delegator = delegatorCache.delegators[cacheKey] - - if (!delegator) { - delegator = delegatorCache.delegators[cacheKey] = - new DOMDelegator(document) - } - - if (opts.defaultEvents !== false) { - for (var i = 0; i < commonEvents.length; i++) { - delegator.listenTo(commonEvents[i]) - } - } - - return delegator - } - - Delegator.allocateHandle = DOMDelegator.allocateHandle; - Delegator.transformHandle = DOMDelegator.transformHandle; - - -/***/ }, -/* 47 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {var root = typeof window !== 'undefined' ? - window : typeof global !== 'undefined' ? - global : {}; - - module.exports = Individual - - function Individual(key, value) { - if (root[key]) { - return root[key] - } - - Object.defineProperty(root, key, { - value: value - , configurable: true - }) - - return value - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - var inherits = __webpack_require__(65) - - var ALL_PROPS = [ - "altKey", "bubbles", "cancelable", "ctrlKey", - "eventPhase", "metaKey", "relatedTarget", "shiftKey", - "target", "timeStamp", "type", "view", "which" - ] - var KEY_PROPS = ["char", "charCode", "key", "keyCode"] - var MOUSE_PROPS = [ - "button", "buttons", "clientX", "clientY", "layerX", - "layerY", "offsetX", "offsetY", "pageX", "pageY", - "screenX", "screenY", "toElement" - ] - - var rkeyEvent = /^key|input/ - var rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/ - - module.exports = ProxyEvent - - function ProxyEvent(ev) { - if (!(this instanceof ProxyEvent)) { - return new ProxyEvent(ev) - } - - if (rkeyEvent.test(ev.type)) { - return new KeyEvent(ev) - } else if (rmouseEvent.test(ev.type)) { - return new MouseEvent(ev) - } - - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - this._rawEvent = ev - this._bubbles = false; - } - - ProxyEvent.prototype.preventDefault = function () { - this._rawEvent.preventDefault() - } - - ProxyEvent.prototype.startPropagation = function () { - this._bubbles = true; - } - - function MouseEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < MOUSE_PROPS.length; j++) { - var mousePropKey = MOUSE_PROPS[j] - this[mousePropKey] = ev[mousePropKey] - } - - this._rawEvent = ev - } - - inherits(MouseEvent, ProxyEvent) - - function KeyEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < KEY_PROPS.length; j++) { - var keyPropKey = KEY_PROPS[j] - this[keyPropKey] = ev[keyPropKey] - } - - this._rawEvent = ev - } - - inherits(KeyEvent, ProxyEvent) - - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = removeEvent - - function removeEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - return - } else if (Array.isArray(event)) { - var index = event.indexOf(handler) - if (index !== -1) { - event.splice(index, 1) - } - } else if (event === handler) { - events[type] = null - } - } - - -/***/ }, -/* 50 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(51)() + module.exports = __webpack_require__(42)() ? Object.assign - : __webpack_require__(52); + : __webpack_require__(43); /***/ }, -/* 51 */ +/* 42 */ /***/ function(module, exports) { 'use strict'; @@ -4842,13 +4298,13 @@ module.exports = /***/ }, -/* 52 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keys = __webpack_require__(54) - , value = __webpack_require__(59) + var keys = __webpack_require__(45) + , value = __webpack_require__(50) , max = Math.max; @@ -4870,7 +4326,7 @@ module.exports = /***/ }, -/* 53 */ +/* 44 */ /***/ function(module, exports) { // Deprecated @@ -4881,18 +4337,18 @@ module.exports = /***/ }, -/* 54 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(55)() + module.exports = __webpack_require__(46)() ? Object.keys - : __webpack_require__(56); + : __webpack_require__(47); /***/ }, -/* 55 */ +/* 46 */ /***/ function(module, exports) { 'use strict'; @@ -4906,7 +4362,7 @@ module.exports = /***/ }, -/* 56 */ +/* 47 */ /***/ function(module, exports) { 'use strict'; @@ -4919,7 +4375,7 @@ module.exports = /***/ }, -/* 57 */ +/* 48 */ /***/ function(module, exports) { 'use strict'; @@ -4942,7 +4398,7 @@ module.exports = /***/ }, -/* 58 */ +/* 49 */ /***/ function(module, exports) { 'use strict'; @@ -4954,7 +4410,7 @@ module.exports = /***/ }, -/* 59 */ +/* 50 */ /***/ function(module, exports) { 'use strict'; @@ -4966,18 +4422,18 @@ module.exports = /***/ }, -/* 60 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(61)() + module.exports = __webpack_require__(52)() ? String.prototype.contains - : __webpack_require__(62); + : __webpack_require__(53); /***/ }, -/* 61 */ +/* 52 */ /***/ function(module, exports) { 'use strict'; @@ -4991,7 +4447,7 @@ module.exports = /***/ }, -/* 62 */ +/* 53 */ /***/ function(module, exports) { 'use strict'; @@ -5004,7 +4460,33 @@ module.exports = /***/ }, -/* 63 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var OneVersionConstraint = __webpack_require__(56); + + var MY_VERSION = '7'; + OneVersionConstraint('ev-store', MY_VERSION); + + var hashKey = '__EV_STORE_KEY@' + MY_VERSION; + + module.exports = EvStore; + + function EvStore(elem) { + var hash = elem[hashKey]; + + if (!hash) { + hash = elem[hashKey] = {}; + } + + return hash; + } + + +/***/ }, +/* 55 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {'use strict'; @@ -5030,12 +4512,12 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 64 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Individual = __webpack_require__(63); + var Individual = __webpack_require__(55); module.exports = OneVersion; @@ -5058,36 +4540,7 @@ module.exports = /***/ }, -/* 65 */ -/***/ function(module, exports) { - - if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } - - -/***/ }, -/* 66 */ +/* 57 */ /***/ function(module, exports) { /** @@ -5141,7 +4594,7 @@ module.exports = /***/ }, -/* 67 */ +/* 58 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5587,7 +5040,7 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 68 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5598,8 +5051,8 @@ module.exports = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keysIn = __webpack_require__(72), - rest = __webpack_require__(10); + var keysIn = __webpack_require__(63), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -5941,7 +5394,7 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 69 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5952,8 +5405,8 @@ module.exports = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var assignInWith = __webpack_require__(68), - rest = __webpack_require__(10); + var assignInWith = __webpack_require__(59), + rest = __webpack_require__(9); /** * A faster alternative to `Function#apply`, this function invokes `func` @@ -6063,7 +5516,7 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 70 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6074,8 +5527,8 @@ module.exports = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseFor = __webpack_require__(66), - keys = __webpack_require__(71); + var baseFor = __webpack_require__(57), + keys = __webpack_require__(62); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. @@ -6153,9 +5606,9 @@ module.exports = /***/ }, -/* 71 */ -67, -/* 72 */ +/* 62 */ +58, +/* 63 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -6607,7 +6060,7 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 73 */ +/* 64 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) { @@ -6645,7 +6098,7 @@ module.exports = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 74 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { // uuid.js @@ -6656,7 +6109,7 @@ module.exports = // Unique ID creation requires a high quality random # generator. We feature // detect to determine the best RNG source, normalizing to a function that // returns 128-bits of randomness, since that's what's usually required - var _rng = __webpack_require__(73); + var _rng = __webpack_require__(64); // Maps for number <-> hex string conversion var _byteToHex = []; @@ -6834,34 +6287,34 @@ module.exports = /***/ }, -/* 75 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { - var createElement = __webpack_require__(21) + var createElement = __webpack_require__(19) module.exports = createElement /***/ }, -/* 76 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { - var diff = __webpack_require__(89) + var diff = __webpack_require__(80) module.exports = diff /***/ }, -/* 77 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { - var patch = __webpack_require__(80) + var patch = __webpack_require__(71) module.exports = patch /***/ }, -/* 78 */ +/* 69 */ /***/ function(module, exports) { // Maps a virtual DOM tree onto a real DOM tree in an efficient manner. @@ -6952,15 +6405,15 @@ module.exports = /***/ }, -/* 79 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isWidget = __webpack_require__(2) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) - var updateWidget = __webpack_require__(81) + var updateWidget = __webpack_require__(72) module.exports = applyPatch @@ -7109,15 +6562,15 @@ module.exports = /***/ }, -/* 80 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) - var isArray = __webpack_require__(12) + var document = __webpack_require__(17) + var isArray = __webpack_require__(11) - var render = __webpack_require__(21) - var domIndex = __webpack_require__(78) - var patchOp = __webpack_require__(79) + var render = __webpack_require__(19) + var domIndex = __webpack_require__(69) + var patchOp = __webpack_require__(70) module.exports = patch function patch(rootNode, patches, renderOptions) { @@ -7195,7 +6648,7 @@ module.exports = /***/ }, -/* 81 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { var isWidget = __webpack_require__(2) @@ -7216,12 +6669,12 @@ module.exports = /***/ }, -/* 82 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var EvStore = __webpack_require__(5); + var EvStore = __webpack_require__(54); module.exports = EvHook; @@ -7249,7 +6702,7 @@ module.exports = /***/ }, -/* 83 */ +/* 74 */ /***/ function(module, exports) { 'use strict'; @@ -7272,24 +6725,24 @@ module.exports = /***/ }, -/* 84 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var isArray = __webpack_require__(12); + var isArray = __webpack_require__(11); - var VNode = __webpack_require__(86); - var VText = __webpack_require__(87); + var VNode = __webpack_require__(77); + var VText = __webpack_require__(78); var isVNode = __webpack_require__(3); - var isVText = __webpack_require__(8); + var isVText = __webpack_require__(7); var isWidget = __webpack_require__(2); - var isHook = __webpack_require__(7); - var isVThunk = __webpack_require__(6); + var isHook = __webpack_require__(6); + var isVThunk = __webpack_require__(5); - var parseTag = __webpack_require__(85); - var softSetHook = __webpack_require__(83); - var evHook = __webpack_require__(82); + var parseTag = __webpack_require__(76); + var softSetHook = __webpack_require__(74); + var evHook = __webpack_require__(73); module.exports = h; @@ -7415,12 +6868,12 @@ module.exports = /***/ }, -/* 85 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var split = __webpack_require__(41); + var split = __webpack_require__(39); var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/; var notClassId = /^\.|#/; @@ -7475,14 +6928,14 @@ module.exports = /***/ }, -/* 86 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) var isVNode = __webpack_require__(3) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var isVHook = __webpack_require__(7) + var isThunk = __webpack_require__(5) + var isVHook = __webpack_require__(6) module.exports = VirtualNode @@ -7553,7 +7006,7 @@ module.exports = /***/ }, -/* 87 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -7569,11 +7022,11 @@ module.exports = /***/ }, -/* 88 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = diffProps @@ -7633,19 +7086,19 @@ module.exports = /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(12) + var isArray = __webpack_require__(11) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var handleThunk = __webpack_require__(22) + var isThunk = __webpack_require__(5) + var handleThunk = __webpack_require__(20) - var diffProps = __webpack_require__(88) + var diffProps = __webpack_require__(79) module.exports = diff @@ -8066,54 +7519,7 @@ module.exports = /***/ }, -/* 90 */ -/***/ function(module, exports, __webpack_require__) { - - var hiddenStore = __webpack_require__(91); - - module.exports = createStore; - - function createStore() { - var key = {}; - - return function (obj) { - if ((typeof obj !== 'object' || obj === null) && - typeof obj !== 'function' - ) { - throw new Error('Weakmap-shim: Key must be object') - } - - var store = obj.valueOf(key); - return store && store.identity === key ? - store : hiddenStore(obj, key); - }; - } - - -/***/ }, -/* 91 */ -/***/ function(module, exports) { - - module.exports = hiddenStore; - - function hiddenStore(obj, key) { - var store = { identity: key }; - var valueOf = obj.valueOf; - - Object.defineProperty(obj, "valueOf", { - value: function (value) { - return value !== key ? - valueOf.apply(this, arguments) : store; - }, - writable: true - }); - - return store; - } - - -/***/ }, -/* 92 */ +/* 81 */ /***/ function(module, exports) { 'use strict'; @@ -8269,7 +7675,7 @@ module.exports = }; /***/ }, -/* 93 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { module.exports = function() { @@ -8277,34 +7683,10 @@ module.exports = }; /***/ }, -/* 94 */ +/* 83 */ /***/ function(module, exports) { /* (ignored) */ -/***/ }, -/* 95 */ -94, -/* 96 */ -/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { - - /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : - typeof window !== 'undefined' ? window : {} - var minDoc = __webpack_require__(__webpack_module_template_argument_0__); - - if (typeof document !== 'undefined') { - module.exports = document; - } else { - var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } - - module.exports = doccy; - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - /***/ } /******/ ]))); \ No newline at end of file diff --git a/dist/js/waveform-playlist.commonjs2.min.js b/dist/js/waveform-playlist.commonjs2.min.js index 7bc9763f..62ae6b01 100644 --- a/dist/js/waveform-playlist.commonjs2.min.js +++ b/dist/js/waveform-playlist.commonjs2.min.js @@ -1,8 +1,8 @@ -module.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?(0,h["default"])():arguments[1],r=arguments.length<=2||void 0===arguments[2]?(0,l["default"])():arguments[2];if(void 0===e.container)throw new Error("DOM element container must be given.");var i=new(window.AudioContext||window.webkitAudioContext),o={jsLocation:"js/",ac:i,sampleRate:i.sampleRate,samplesPerPixel:4096,mono:!0,fadeType:"logarithmic",timescale:!1,controls:{show:!1,width:150},colors:{waveOutlineColor:"white",timeColor:"grey",fadeColor:"black"},waveHeight:128,state:"cursor",zoomLevels:[512,1024,2048,4096]},s=(0,a["default"])(o,e),c=s.zoomLevels.indexOf(s.samplesPerPixel);if(-1===c)throw new Error("initial samplesPerPixel must be included in array zoomLevels");var f=new p["default"];f.setSampleRate(s.sampleRate),f.setSamplesPerPixel(s.samplesPerPixel),f.setAudioContext(s.ac),f.setEventEmitter(t),f.setUpEventEmitter(),f.setTimeSelection(0,0),f.setState(s.state),f.setControlOptions(s.controls),f.setWaveHeight(s.waveHeight),f.setColors(s.colors),f.setZoomLevels(s.zoomLevels),f.setZoomIndex(c),f.setMono(s.mono);var d=f.render(),v=(0,u["default"])(d);return s.container.appendChild(v),f.tree=d,f.rootNode=v,r.listenTo("scroll"),n.p=s.jsLocation,f}Object.defineProperty(t,"__esModule",{value:!0}),t.init=i;var o=n(18),a=r(o),s=n(75),u=r(s),c=n(46),l=r(c),f=n(15),h=r(f),d=n(24),p=r(d)},function(e,t){"use strict";function n(e,t){return e/t}function r(e,t){return Math.ceil(e*t)}function i(e,t){return~~(e/t)}function o(e,t){return~~(e*t)}function a(e,t,n){return e*t/n}function s(e,t,n){return Math.ceil(e*n/t)}Object.defineProperty(t,"__esModule",{value:!0}),t.samplesToSeconds=n,t.secondsToSamples=r,t.samplesToPixels=i,t.pixelsToSamples=o,t.pixelsToSeconds=a,t.secondsToPixels=s},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(64),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){function n(e){return e&&"Thunk"===e.type}e.exports=n},function(e,t){function n(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualText"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=(0,d.sCurve)(1e4,1);this.setValueCurveAtTime(n,e,t)}function i(e,t){var n=(0,d.sCurve)(1e4,-1);this.setValueCurveAtTime(n,e,t)}function o(e,t){this.linearRampToValueAtTime(0,e),this.linearRampToValueAtTime(1,e+t)}function a(e,t){this.linearRampToValueAtTime(1,e),this.linearRampToValueAtTime(0,e+t)}function s(e,t){this.exponentialRampToValueAtTime(.01,e),this.exponentialRampToValueAtTime(1,e+t)}function u(e,t){this.exponentialRampToValueAtTime(1,e),this.exponentialRampToValueAtTime(.01,e+t)}function c(e,t){var n=(0,d.logarithmic)(1e4,10,1);this.setValueCurveAtTime(n,e,t)}function l(e,t){var n=(0,d.logarithmic)(1e4,10,-1);this.setValueCurveAtTime(n,e,t)}function f(e,t,n,i){switch(t){case p:r.call(e,n,i);break;case v:o.call(e,n,i);break;case m:s.call(e,n,i);break;case y:c.call(e,n,i);break;default:throw new Error("Unsupported Fade type")}}function h(e,t,n,r){switch(t){case p:i.call(e,n,r);break;case v:a.call(e,n,r);break;case m:u.call(e,n,r);break;case y:l.call(e,n,r);break;default:throw new Error("Unsupported Fade type")}}Object.defineProperty(t,"__esModule",{value:!0}),t.FADEOUT=t.FADEIN=t.LOGARITHMIC=t.EXPONENTIAL=t.LINEAR=t.SCURVE=void 0,t.createFadeIn=f,t.createFadeOut=h;var d=n(16),p=t.SCURVE="sCurve",v=t.LINEAR="linear",m=t.EXPONENTIAL="exponential",y=t.LOGARITHMIC="logarithmic";t.FADEIN="FadeIn",t.FADEOUT="FadeOut"},function(e,t){(function(t){function n(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){if("function"!=typeof e)throw new TypeError(u);return t=w(void 0===t?e.length-1:a(t),0),function(){for(var r=arguments,i=-1,o=w(r.length-t,0),a=Array(o);++ie?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,b=t.Object.prototype,k=b.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(84);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;n>t;++t)o[t-1]=arguments[t];h.call(i,this,o)}},s={on:r,once:i,off:o,emit:a},u={on:l(r),once:l(i),off:l(o),emit:l(a)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,o=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,i=t>0?n:e-1-n,o[i]=Math.exp(2*r-1)/Math.exp(1);return o}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function o(e,t,n){var r,i,o=new Float32Array(e),a=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,a=i/e,o[r]=Math.log(1+t*a)/Math.log(1+t);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=o},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!x.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&c(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(67),m=n(10),y=9007199254740991,g="[object Function]",b="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,x=w.hasOwnProperty,P=w.toString,T=o("length"),O=u(function(e,t){a(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},[96,95],function(e,t,n){function r(e,t,n){for(var r in t){var a=t[r];void 0===a?i(e,r,a,n):u(a)?(i(e,r,a,n),a.hook&&a.hook(e,r,n?n[r]:void 0)):s(a)?o(e,t,n,r,a):e[r]=a}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var o in i)e.removeAttribute(o);else if("style"===t)for(var a in i)e.style[a]="";else"string"==typeof i?e[t]="":e[t]=null}}function o(e,t,n,r,i){var o=n?n[r]:void 0;if("attributes"!==r){if(o&&s(o)&&a(o)!==a(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function a(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(17),u=n(7);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!a(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;o(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,void 0))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),o=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.tracks.forEach(function(i){i.setState("cursor"),o.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=o,this.startAnimation(e),Promise.all(this.playoutPromises)}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},"ev-scroll":function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,a.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,a.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},o=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(o.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[o,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var o=n>e?n:e,a=t>r?r:t;this.setCues(o+i,a+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(P.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(P.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,o,a,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,o=Math.min(f,this.duration)):o=this.duration):(i=t-this.startTime,o=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,a=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(at.start&&a1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),o=n.getEvents();Object.keys(o).map(function(e){r["ev-"+e]=o[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{"ev-click":function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{"ev-click":function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},"ev-input":function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),o=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),a=0,s=this.peaks.data.length;r>0&&r>i&&(a=o>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var o=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+a+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);o.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new k["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new x["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new x["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},o)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var o=Math.abs(r*t),a=Math.abs(i*t);e.fillRect(n,0,1,t-a),e.fillRect(n,t+o,1,t-o)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(a,s,i,c,l)}}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function o(e,t,n,r,o){var a=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",a=i(t,n,r),c=o-a[0]*o,e.beginPath(),e.moveTo(0,c),s=1,u=a.length;u>s;s++)c=o-a[s]*o,e.lineTo(s,c);e.stroke()}var a=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&ne?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(a(e)){var t=i(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,k=t.Object.prototype,b=k.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(75);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt;++t)a[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,a)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,a=new Array(n-1),t=1;n>t;++t)a[t-1]=arguments[t];h.call(i,this,a)}},s={on:r,once:i,off:a,emit:o},u={on:l(r),once:l(i),off:l(a),emit:l(o)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,a=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,i=t>0?n:e-1-n,a[i]=Math.exp(2*r-1)/Math.exp(1);return a}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function a(e,t,n){var r,i,a=new Float32Array(e),o=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,o=i/e,a[r]=Math.log(1+t*o)/Math.log(1+t);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=a},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!P.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&c(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(58),m=n(9),y=9007199254740991,g="[object Function]",k="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,P=w.hasOwnProperty,x=w.toString,T=a("length"),O=u(function(e,t){o(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(83);if("undefined"!=typeof document)e.exports=document;else{var a=r["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=a}}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){for(var r in t){var o=t[r];void 0===o?i(e,r,o,n):u(o)?(i(e,r,o,n),o.hook&&o.hook(e,r,n?n[r]:void 0)):s(o)?a(e,t,n,r,o):e[r]=o}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var a in i)e.removeAttribute(a);else if("style"===t)for(var o in i)e.style[o]="";else"string"==typeof i?e[t]="":e[t]=null}}function a(e,t,n,r,i){var a=n?n[r]:void 0;if("attributes"!==r){if(a&&s(a)&&o(a)!==o(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function o(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(15),u=n(6);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!o(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;a(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e,t){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,t))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),a=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.isPlaying()?void this.restartPlayFrom(e,t):(this.tracks.forEach(function(i){i.setState("cursor"),a.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=a,this.startAnimation(e),Promise.all(this.playoutPromises))}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},onscroll:function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,o.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,o.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},a=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(a.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[a,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var a=n>e?n:e,o=t>r?r:t;this.setCues(a+i,o+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(x.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(x.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,a,o,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,a=Math.min(f,this.duration)):a=this.duration):(i=t-this.startTime,a=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,o=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(ot.start&&o1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),a=n.getEvents();Object.keys(a).map(function(e){r["on"+e]=a[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{onclick:function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{onclick:function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},oninput:function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),a=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),o=0,s=this.peaks.data.length;r>0&&r>i&&(o=a>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var a=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+o+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);a.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new b["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new P["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new P["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},a)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var a=Math.abs(r*t),o=Math.abs(i*t);e.fillRect(n,0,1,t-o),e.fillRect(n,t+a,1,t-a)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(o,s,i,c,l)}}}]),e}();t["default"]=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function a(e,t,n,r,a){var o=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",o=i(t,n,r),c=a-o[0]*a,e.beginPath(),e.moveTo(0,c),s=1,u=o.length;u>s;s++)c=a-o[s]*a,e.lineTo(s,c);e.stroke()}var o=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&n * Available under the MIT License * ECMAScript compliant, uniform cross-browser split method */ -e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(a,function(){for(var t=1;t1&&s.index=o)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>o?l.slice(0,o):l}}()},function(e,t,n){!function(t){"use strict";var n="cuid",r=0,i=4,o=36,a=Math.pow(o,i),s=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},u=function(){return s((Math.random()*a<<0).toString(o),i)},c=function(){return r=a>r?r:0,r++,r-1},l=function(){var e,t="c",n=(new Date).getTime().toString(o),r=l.fingerprint(),a=u()+u();return e=s(c().toString(o),i),t+n+e+r+a};l.slug=function(){var e,t=(new Date).getTime().toString(36),n=l.fingerprint().slice(0,1)+l.fingerprint().slice(-1),r=u().slice(-2);return e=c().toString(36).slice(-4),t.slice(-2)+e+n+r},l.globalCount=function(){var e=function(){var e,t=0;for(e in window)t++;return t}();return l.globalCount=function(){return e},e},l.fingerprint=function(){return s((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+l.globalCount().toString(36),4)},t.register?t.register(n,l):e.exports=l}(this.applitude||this)},function(e,t,n){"use strict";var r,i=n(50),o=n(57),a=n(53),s=n(60);r=e.exports=function(e,t){var n,r,a,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=a=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),a=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:a},u?i(o(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:a(t)?null==n?n=void 0:a(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(o(c),l):l}},function(e,t,n){function r(e,t,n){var r=i(e),o=r[t];o?Array.isArray(o)?-1===o.indexOf(n)&&o.push(n):o!==n&&(r[t]=[o,n]):r[t]=n}var i=n(5);e.exports=r},function(e,t,n){function r(e){return this instanceof r?(e=e||l,this.target=e.documentElement,this.events={},this.rawEventListeners={},void(this.globalListeners={})):new r(e)}function i(e,t){function n(t){var n=r[e]||[];if(n.length>0){var a=new v(t);a.currentTarget=i,s(n,a)}o(t.target,t,e)}var r=t.globalListeners,i=t.target;return n}function o(e,t,n){var r=a(e,n);if(r&&r.handlers.length>0){var i=new v(t);if(i.currentTarget=r.currentTarget,s(r.handlers,i),i._bubbles){var u=r.currentTarget.parentNode;o(u,t,n)}}}function a(e,t){if(null===e||"undefined"==typeof e)return null;var n=f(e),r=n[t],i=n.event;if(!r&&!i)return a(e.parentNode,t);var o=[].concat(r||[],i||[]);return new u(e,o)}function s(e,t){e.forEach(function(n){if("function"==typeof n)n(t);else if("function"==typeof n.handleEvent)n.handleEvent(t);else{if("dom-delegator-handle"!==n.type)throw new Error("dom-delegator: unknown handler found: "+JSON.stringify(e));m(n).func(t)}})}function u(e,t){this.currentTarget=e,this.handlers=t}function c(){this.type="dom-delegator-handle"}var l=n(14),f=n(5),h=n(90),d=n(44),p=n(49),v=n(48),m=h();e.exports=r,r.prototype.addEventListener=d,r.prototype.removeEventListener=p,r.allocateHandle=function(e){var t=new c;return m(t).func=e,t},r.transformHandle=function(e,t){var n=m(e).func;return this.allocateHandle(function(e){t(e,n)})},r.prototype.addGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[];-1===n.indexOf(t)&&n.push(t),this.globalListeners[e]=n},r.prototype.removeGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[],r=n.indexOf(t);-1!==r&&n.splice(r,1)},r.prototype.listenTo=function(e){if(e in this.events||(this.events[e]=0),this.events[e]++,1===this.events[e]){var t=this.rawEventListeners[e];t||(t=this.rawEventListeners[e]=i(e,this)),this.target.addEventListener(e,t,!0)}},r.prototype.unlistenTo=function(e){if(e in this.events||(this.events[e]=0),0===this.events[e])throw new Error("already unlistened to event.");if(this.events[e]--,0===this.events[e]){var t=this.rawEventListeners[e];if(!t)throw new Error("dom-delegator#unlistenTo: cannot unlisten to "+e);this.target.removeEventListener(e,t,!0)}}},function(e,t,n){function r(e){e=e||{};var t=e.document||a,n=t[l];n||(n=t[l]=o());var r=f.delegators[n];if(r||(r=f.delegators[n]=new s(t)),e.defaultEvents!==!1)for(var i=0;ia;++a)t=arguments[a],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(55)()?Object.keys:n(56)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(61)()?String.prototype.contains:n(62)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,o=r+"_ENFORCE_SINGLETON",a=i(o,t);if(a!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+a+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(63);e.exports=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function o(e){return j(Object(e))}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){var t=u(e);if(!t&&!l(e))return o(e);var n=s(e),a=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||a&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,b="[object Arguments]",k="[object Function]",w="[object GeneratorFunction]",x="[object String]",P=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,A=a("length"),R=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,k[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&u(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(72),v=n(10),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,k=t.Object.prototype,w=k.hasOwnProperty,x=k.toString,P=o("length"),T=s(function(e,t,n){a(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||o(e,u[n])&&!c.call(r,n)?t:e}function o(e,t){return e===t||e!==e&&t!==t}var a=n(68),s=n(10),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(a,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:a}function o(e,t){return e&&r(e,i(t))}function a(e){return e}var s=n(66),u=n(71);e.exports=o},67,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function o(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){for(var t=-1,n=u(e),i=o(e),a=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function o(e,t,n){var r=t&&n||0,o=t||[];e=e||{};var a=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(a=a+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=a,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;o[r++]=l>>>24&255,o[r++]=l>>>16&255,o[r++]=l>>>8&255,o[r++]=255&l;var f=s/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var m=e.node||h,y=0;6>y;y++)o[r+y]=m[y];return t?t:i(o)}function a(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;16>a;a++)t[r+a]=o[a];return t||i(o)}for(var s=n(73),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=a;m.v1=o,m.v4=a,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(21);e.exports=r},function(e,t,n){var r=n(89);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(o),r(e,t,n,i,0)):{}}function r(e,t,n,o,s){if(o=o||{},e){i(n,s,s)&&(o[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=o;){if(r=(a+o)/2>>0,i=e[r],o===a)return i>=t&&n>=i;if(t>i)o=r+1;else{if(!(i>n))return!0;a=r-1}}return!1}function o(e,t){return e>t?1:-1}var a={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return o(t,d,n);case p.VTEXT:return a(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function o(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function a(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var o=e.parentNode;i=r.render(n,r),o&&i!==e&&o.replaceChild(i,e)}return i}function s(e,t,n,r){var i,o=v(t,n);i=o?n.update(t,e)||e:r.render(n,r);var a=e.parentNode;return a&&i!==e&&a.replaceChild(i,e),o||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,o=r.render(n,r);return i&&o!==e&&i.replaceChild(o,e),o}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,o=e.childNodes,a={},s=0;s=u++?null:o[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(20),d=n(2),p=n(23),v=n(81);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=a(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;cb;b++){var k=n[b];o(k)?(d+=k.count||0,!p&&k.hasWidgets&&(p=!0),!v&&k.hasThunks&&(v=!0),m||!k.hooks&&!k.descendantHooks||(m=!0)):!p&&a(k)?"function"==typeof k.destroy&&(p=!0):!v&&s(k)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),o=n(3),a=n(2),s=n(6),u=n(7);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(o(u)&&o(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(a(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var o=n(17),a=n(7);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)k(e)||(a(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=P(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=o(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else b(t)?b(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):k(t)&&(k(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&a(e,n,r)}}function o(e,t,n,r,o){for(var a=e.children,s=h(a,t.children),u=s.children,c=a.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=a[d],m=u[d];o+=1,p?i(p,m,n,o):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(o+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function a(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(k(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,s(a,t,n),g(a)&&a.count&&(n+=a.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var o=x(e,t),a=r(o.a,o.b);c(a)&&(n[i]=new y(y.THUNK,null,a))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,l(a,t,n),g(a)&&a.count&&(n+=a.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var o=p(e),a=o.keys,s=o.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(b)}for(var k,w=u.slice(),x=0,P=[],T=[],O=0;Oi;i++){var o=e[i];o.key?t[o.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(12),y=n(23),g=n(3),b=n(8),k=n(2),w=n(6),x=n(22),P=n(88);e.exports=r},function(e,t,n){function r(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:i(t,e)}}var i=n(91);e.exports=r},function(e,t){function n(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}e.exports=n},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,o=e.length;o>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,o){if(t=t||1e4,o=o||8,n=n||!0,[8,16,32].indexOf(o)<0)throw new Error("Invalid number of bits specified for peaks.");var a,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(a=0;l>a;a++)u=e.getChannelData(a),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,o));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,o));return n&&f.length>1&&(f=makeMono(f,o)),s=f[0].length/2,{length:s,data:f,bits:o}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){},94,function(e,t,n,r){(function(t){var i="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},o=n(r);if("undefined"!=typeof document)e.exports=document;else{var a=i["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=a}}).call(t,function(){return this}())}])); \ No newline at end of file +e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,a){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,a);var o,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(o=new RegExp("^"+i.source+"$(?!\\s)",f)),a=a===e?-1>>>0:a>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(o,function(){for(var t=1;t1&&s.index=a)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>a?l.slice(0,a):l}}()},function(e,t,n){"use strict";var r,i=n(41),a=n(48),o=n(44),s=n(51);r=e.exports=function(e,t){var n,r,o,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=o=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),o=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:o},u?i(a(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:o(t)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(a(c),l):l}},function(e,t,n){"use strict";e.exports=n(42)()?Object.assign:n(43)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"!=typeof t?!1:(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(45),i=n(50),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},o=1;u>o;++o)t=arguments[o],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(46)()?Object.keys:n(47)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(52)()?String.prototype.contains:n(53)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";function r(e){var t=e[o];return t||(t=e[o]={}),t}var i=n(56),a="7";i("ev-store",a);var o="__EV_STORE_KEY@"+a;e.exports=r},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,a=r+"_ENFORCE_SINGLETON",o=i(a,t);if(o!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+o+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(55);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(n(a[u],u,a)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function a(e){return j(Object(e))}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){var t=u(e);if(!t&&!l(e))return a(e);var n=s(e),o=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||o&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,k="[object Arguments]",b="[object Function]",w="[object GeneratorFunction]",P="[object String]",x=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,R=o("length"),A=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,b[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&u(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(63),v=n(9),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,b=t.Object.prototype,w=b.hasOwnProperty,P=b.toString,x=a("length"),T=s(function(e,t,n){o(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||a(e,u[n])&&!c.call(r,n)?t:e}function a(e,t){return e===t||e!==e&&t!==t}var o=n(59),s=n(9),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(o,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:o}function a(e,t){return e&&r(e,i(t))}function o(e){return e}var s=n(57),u=n(62);e.exports=a},58,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){for(var t=-1,n=u(e),i=a(e),o=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function a(e,t,n){var r=t&&n||0,a=t||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(o=o+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=o,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;a[r++]=l>>>24&255,a[r++]=l>>>16&255,a[r++]=l>>>8&255,a[r++]=255&l;var f=s/4294967296*1e4&268435455;a[r++]=f>>>8&255,a[r++]=255&f,a[r++]=f>>>24&15|16,a[r++]=f>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=e.node||h,y=0;6>y;y++)a[r+y]=m[y];return t?t:i(a)}function o(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;16>o;o++)t[r+o]=a[o];return t||i(a)}for(var s=n(64),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=o;m.v1=a,m.v4=o,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(19);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t,n){var r=n(71);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(a),r(e,t,n,i,0)):{}}function r(e,t,n,a,s){if(a=a||{},e){i(n,s,s)&&(a[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=a;){if(r=(o+a)/2>>0,i=e[r],a===o)return i>=t&&n>=i;if(t>i)a=r+1;else{if(!(i>n))return!0;o=r-1}}return!1}function a(e,t){return e>t?1:-1}var o={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return a(t,d,n);case p.VTEXT:return o(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function a(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function o(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var a=e.parentNode;i=r.render(n,r),a&&i!==e&&a.replaceChild(i,e)}return i}function s(e,t,n,r){var i,a=v(t,n);i=a?n.update(t,e)||e:r.render(n,r);var o=e.parentNode;return o&&i!==e&&o.replaceChild(i,e),a||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,a=r.render(n,r);return i&&a!==e&&i.replaceChild(a,e),a}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,a=e.childNodes,o={},s=0;s=u++?null:a[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(18),d=n(2),p=n(21),v=n(72);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=o(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;ck;k++){var b=n[k];a(b)?(d+=b.count||0,!p&&b.hasWidgets&&(p=!0),!v&&b.hasThunks&&(v=!0),m||!b.hooks&&!b.descendantHooks||(m=!0)):!p&&o(b)?"function"==typeof b.destroy&&(p=!0):!v&&s(b)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),a=n(3),o=n(2),s=n(5),u=n(6);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(a(u)&&a(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(o(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var a=n(15),o=n(6);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)b(e)||(o(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=x(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=a(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else k(t)?k(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):b(t)&&(b(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&o(e,n,r)}}function a(e,t,n,r,a){for(var o=e.children,s=h(o,t.children),u=s.children,c=o.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=o[d],m=u[d];a+=1,p?i(p,m,n,a):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(a+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function o(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(b(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,s(o,t,n),g(o)&&o.count&&(n+=o.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var a=P(e,t),o=r(a.a,a.b);c(o)&&(n[i]=new y(y.THUNK,null,o))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,l(o,t,n),g(o)&&o.count&&(n+=o.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var a=p(e),o=a.keys,s=a.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(k)}for(var b,w=u.slice(),P=0,x=[],T=[],O=0;Oi;i++){var a=e[i];a.key?t[a.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(11),y=n(21),g=n(3),k=n(7),b=n(2),w=n(5),P=n(20),x=n(79);e.exports=r},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,a=e.length;a>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,a){if(t=t||1e4,a=a||8,n=n||!0,[8,16,32].indexOf(a)<0)throw new Error("Invalid number of bits specified for peaks.");var o,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(o=0;l>o;o++)u=e.getChannelData(o),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,a));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,a));return n&&f.length>1&&(f=makeMono(f,a)),s=f[0].length/2,{length:s,data:f,bits:a}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){}])); \ No newline at end of file diff --git a/dist/js/waveform-playlist.umd.js b/dist/js/waveform-playlist.umd.js index 9a6d3971..928c4d4b 100644 --- a/dist/js/waveform-playlist.umd.js +++ b/dist/js/waveform-playlist.umd.js @@ -84,23 +84,19 @@ return /******/ (function(modules) { // webpackBootstrap }); exports.init = init; - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _createElement = __webpack_require__(75); + var _createElement = __webpack_require__(66); var _createElement2 = _interopRequireDefault(_createElement); - var _domDelegator = __webpack_require__(46); - - var _domDelegator2 = _interopRequireDefault(_domDelegator); - - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); - var _Playlist = __webpack_require__(24); + var _Playlist = __webpack_require__(22); var _Playlist2 = _interopRequireDefault(_Playlist); @@ -109,7 +105,6 @@ return /******/ (function(modules) { // webpackBootstrap function init() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var ee = arguments.length <= 1 || arguments[1] === undefined ? (0, _eventEmitter2.default)() : arguments[1]; - var delegator = arguments.length <= 2 || arguments[2] === undefined ? (0, _domDelegator2.default)() : arguments[2]; if (options.container === undefined) { throw new Error("DOM element container must be given."); @@ -169,9 +164,6 @@ return /******/ (function(modules) { // webpackBootstrap playlist.tree = tree; playlist.rootNode = rootNode; - //have to add extra events that aren't followed by default. - delegator.listenTo("scroll"); - __webpack_require__.p = config.jsLocation; return playlist; @@ -249,32 +241,6 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var OneVersionConstraint = __webpack_require__(64); - - var MY_VERSION = '7'; - OneVersionConstraint('ev-store', MY_VERSION); - - var hashKey = '__EV_STORE_KEY@' + MY_VERSION; - - module.exports = EvStore; - - function EvStore(elem) { - var hash = elem[hashKey]; - - if (!hash) { - hash = elem[hashKey] = {}; - } - - return hash; - } - - -/***/ }, -/* 6 */ /***/ function(module, exports) { module.exports = isThunk @@ -285,7 +251,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { module.exports = isHook @@ -298,7 +264,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -311,7 +277,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -323,7 +289,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.createFadeIn = createFadeIn; exports.createFadeOut = createFadeOut; - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); var SCURVE = exports.SCURVE = "sCurve"; var LINEAR = exports.LINEAR = "linear"; @@ -413,7 +379,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -669,16 +635,16 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { - var h = __webpack_require__(84) + var h = __webpack_require__(75) module.exports = h /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports) { var nativeIsArray = Array.isArray @@ -692,7 +658,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 13 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -704,7 +670,7 @@ return /******/ (function(modules) { // webpackBootstrap }); exports.STATE_FINISHED = exports.STATE_DECODING = exports.STATE_LOADING = exports.STATE_UNINITIALIZED = undefined; - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); @@ -774,15 +740,13 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 14 */ -[96, 94], -/* 15 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var d = __webpack_require__(43) - , callable = __webpack_require__(58) + var d = __webpack_require__(40) + , callable = __webpack_require__(49) , apply = Function.prototype.apply, call = Function.prototype.call , create = Object.create, defineProperty = Object.defineProperty @@ -914,7 +878,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 16 */ +/* 14 */ /***/ function(module, exports) { 'use strict'; @@ -994,7 +958,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 17 */ +/* 15 */ /***/ function(module, exports) { "use strict"; @@ -1005,7 +969,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 18 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -1016,8 +980,8 @@ return /******/ (function(modules) { // webpackBootstrap * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keys = __webpack_require__(67), - rest = __webpack_require__(10); + var keys = __webpack_require__(58), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -1375,13 +1339,33 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 19 */ -[96, 95], -/* 20 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} + var minDoc = __webpack_require__(83); + + if (typeof document !== 'undefined') { + module.exports = document; + } else { + var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } + + module.exports = doccy; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = applyProperties @@ -1480,17 +1464,17 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 21 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) + var document = __webpack_require__(17) - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var handleThunk = __webpack_require__(22) + var handleThunk = __webpack_require__(20) module.exports = createElement @@ -1532,13 +1516,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 22 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) + var isThunk = __webpack_require__(5) module.exports = handleThunk @@ -1578,7 +1562,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 23 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -1606,7 +1590,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 24 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -1617,45 +1601,45 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _lodash = __webpack_require__(69); + var _lodash = __webpack_require__(60); var _lodash2 = _interopRequireDefault(_lodash); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _diff = __webpack_require__(76); + var _diff = __webpack_require__(67); var _diff2 = _interopRequireDefault(_diff); - var _patch = __webpack_require__(77); + var _patch = __webpack_require__(68); var _patch2 = _interopRequireDefault(_patch); var _conversions = __webpack_require__(1); - var _LoaderFactory = __webpack_require__(33); + var _LoaderFactory = __webpack_require__(31); var _LoaderFactory2 = _interopRequireDefault(_LoaderFactory); - var _ScrollHook = __webpack_require__(30); + var _ScrollHook = __webpack_require__(28); var _ScrollHook2 = _interopRequireDefault(_ScrollHook); - var _TimeScale = __webpack_require__(26); + var _TimeScale = __webpack_require__(24); var _TimeScale2 = _interopRequireDefault(_TimeScale); - var _Track = __webpack_require__(27); + var _Track = __webpack_require__(25); var _Track2 = _interopRequireDefault(_Track); - var _Playout = __webpack_require__(25); + var _Playout = __webpack_require__(23); var _Playout2 = _interopRequireDefault(_Playout); - var _recorderWorker = __webpack_require__(93); + var _recorderWorker = __webpack_require__(82); var _recorderWorker2 = _interopRequireDefault(_recorderWorker); @@ -2130,14 +2114,14 @@ return /******/ (function(modules) { // webpackBootstrap } }, { key: 'restartPlayFrom', - value: function restartPlayFrom(cursorPos) { + value: function restartPlayFrom(start, end) { this.stopAnimation(); this.tracks.forEach(function (editor) { editor.scheduleStop(); }); - return Promise.all(this.playoutPromises).then(this.play.bind(this, cursorPos, undefined)); + return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end)); } }, { key: 'play', @@ -2154,6 +2138,11 @@ return /******/ (function(modules) { // webpackBootstrap endTime = selected.end; } + if (this.isPlaying()) { + this.restartPlayFrom(startTime, endTime); + return; + } + this.tracks.forEach(function (track) { track.setState('cursor'); playoutPromises.push(track.schedulePlay(currentTime, startTime, endTime, { @@ -2347,7 +2336,7 @@ return /******/ (function(modules) { // webpackBootstrap "attributes": { "style": "overflow: auto;" }, - "ev-scroll": function evScroll(e) { + "onscroll": function onscroll(e) { _this12.scrollLeft = (0, _conversions.pixelsToSeconds)(e.target.scrollLeft, _this12.samplesPerPixel, _this12.sampleRate); _this12.ee.emit("scroll", _this12.scrollLeft); }, @@ -2373,7 +2362,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 25 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2384,7 +2373,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2516,7 +2505,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 26 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2529,11 +2518,11 @@ return /******/ (function(modules) { // webpackBootstrap var _conversions = __webpack_require__(1); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _TimeScaleHook = __webpack_require__(31); + var _TimeScaleHook = __webpack_require__(29); var _TimeScaleHook2 = _interopRequireDefault(_TimeScaleHook); @@ -2700,7 +2689,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 27 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2711,41 +2700,41 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(70); + var _lodash3 = __webpack_require__(61); var _lodash4 = _interopRequireDefault(_lodash3); - var _uuid = __webpack_require__(74); + var _uuid = __webpack_require__(65); var _uuid2 = _interopRequireDefault(_uuid); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); var _conversions = __webpack_require__(1); - var _webaudioPeaks = __webpack_require__(92); + var _webaudioPeaks = __webpack_require__(81); var _webaudioPeaks2 = _interopRequireDefault(_webaudioPeaks); - var _states = __webpack_require__(35); + var _states = __webpack_require__(33); var _states2 = _interopRequireDefault(_states); - var _CanvasHook = __webpack_require__(28); + var _CanvasHook = __webpack_require__(26); var _CanvasHook2 = _interopRequireDefault(_CanvasHook); - var _FadeCanvasHook = __webpack_require__(29); + var _FadeCanvasHook = __webpack_require__(27); var _FadeCanvasHook2 = _interopRequireDefault(_FadeCanvasHook); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3097,7 +3086,7 @@ return /******/ (function(modules) { // webpackBootstrap var stateEvents = state.getEvents(); Object.keys(stateEvents).map(function (event) { - config['ev-' + event] = stateEvents[event].bind(state); + config['on' + event] = stateEvents[event].bind(state); }); stateClass = state.getClasses(); @@ -3118,9 +3107,9 @@ return /******/ (function(modules) { // webpackBootstrap return (0, _h2.default)("div.controls", { attributes: { "style": 'height: ' + numChan * data.height + 'px; width: ' + data.controls.width + 'px; position: absolute; left: 0; z-index: 10;' - } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "ev-click": function evClick() { + } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "onclick": function onclick() { _this3.ee.emit("mute", _this3); - } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "ev-click": function evClick() { + } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "onclick": function onclick() { _this3.ee.emit("solo", _this3); } }, ["Solo"])]), (0, _h2.default)("label", [(0, _h2.default)("input.volume-slider", { attributes: { @@ -3129,7 +3118,7 @@ return /******/ (function(modules) { // webpackBootstrap "max": 100, "value": 100 }, - "ev-input": function evInput(e) { + "oninput": function oninput(e) { _this3.ee.emit("volumechange", e.target.value, _this3); } })])]); @@ -3290,7 +3279,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 28 */ +/* 26 */ /***/ function(module, exports) { 'use strict'; @@ -3360,7 +3349,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 29 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3371,9 +3360,9 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3454,7 +3443,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 30 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3495,7 +3484,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 31 */ +/* 29 */ /***/ function(module, exports) { 'use strict'; @@ -3552,7 +3541,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 32 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3565,7 +3554,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3629,7 +3618,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 33 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3640,11 +3629,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _BlobLoader = __webpack_require__(32); + var _BlobLoader = __webpack_require__(30); var _BlobLoader2 = _interopRequireDefault(_BlobLoader); - var _XHRLoader = __webpack_require__(34); + var _XHRLoader = __webpack_require__(32); var _XHRLoader2 = _interopRequireDefault(_XHRLoader); @@ -3676,7 +3665,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3689,7 +3678,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3751,7 +3740,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3760,23 +3749,23 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _CursorState = __webpack_require__(36); + var _CursorState = __webpack_require__(34); var _CursorState2 = _interopRequireDefault(_CursorState); - var _SelectState = __webpack_require__(39); + var _SelectState = __webpack_require__(37); var _SelectState2 = _interopRequireDefault(_SelectState); - var _ShiftState = __webpack_require__(40); + var _ShiftState = __webpack_require__(38); var _ShiftState2 = _interopRequireDefault(_ShiftState); - var _FadeInState = __webpack_require__(37); + var _FadeInState = __webpack_require__(35); var _FadeInState2 = _interopRequireDefault(_FadeInState); - var _FadeOutState = __webpack_require__(38); + var _FadeOutState = __webpack_require__(36); var _FadeOutState2 = _interopRequireDefault(_FadeOutState); @@ -3791,7 +3780,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3845,7 +3834,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3899,7 +3888,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3953,7 +3942,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4036,7 +4025,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4111,7 +4100,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = _class; /***/ }, -/* 41 */ +/* 39 */ /***/ function(module, exports) { /*! @@ -4223,131 +4212,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * cuid.js - * Collision-resistant UID generator for browsers and node. - * Sequential for fast db lookups and recency sorting. - * Safe for element IDs and server-side lookups. - * - * Extracted from CLCTR - * - * Copyright (c) Eric Elliott 2012 - * MIT License - */ - - /*global window, navigator, document, require, process, module */ - (function (app) { - 'use strict'; - var namespace = 'cuid', - c = 0, - blockSize = 4, - base = 36, - discreteValues = Math.pow(base, blockSize), - - pad = function pad(num, size) { - var s = "000000000" + num; - return s.substr(s.length-size); - }, - - randomBlock = function randomBlock() { - return pad((Math.random() * - discreteValues << 0) - .toString(base), blockSize); - }, - - safeCounter = function () { - c = (c < discreteValues) ? c : 0; - c++; // this is not subliminal - return c - 1; - }, - - api = function cuid() { - // Starting with a lowercase letter makes - // it HTML element ID friendly. - var letter = 'c', // hard-coded allows for sequential access - - // timestamp - // warning: this exposes the exact date and time - // that the uid was created. - timestamp = (new Date().getTime()).toString(base), - - // Prevent same-machine collisions. - counter, - - // A few chars to generate distinct ids for different - // clients (so different computers are far less - // likely to generate the same id) - fingerprint = api.fingerprint(), - - // Grab some more chars from Math.random() - random = randomBlock() + randomBlock(); - - counter = pad(safeCounter().toString(base), blockSize); - - return (letter + timestamp + counter + fingerprint + random); - }; - - api.slug = function slug() { - var date = new Date().getTime().toString(36), - counter, - print = api.fingerprint().slice(0,1) + - api.fingerprint().slice(-1), - random = randomBlock().slice(-2); - - counter = safeCounter().toString(36).slice(-4); - - return date.slice(-2) + - counter + print + random; - }; - - api.globalCount = function globalCount() { - // We want to cache the results of this - var cache = (function calc() { - var i, - count = 0; - - for (i in window) { - count++; - } - - return count; - }()); - - api.globalCount = function () { return cache; }; - return cache; - }; - - api.fingerprint = function browserPrint() { - return pad((navigator.mimeTypes.length + - navigator.userAgent.length).toString(36) + - api.globalCount().toString(36), 4); - }; - - // don't change anything from here down. - if (app.register) { - app.register(namespace, api); - } else if (true) { - module.exports = api; - } else { - app[namespace] = api; - } - - }(this.applitude || this)); - - -/***/ }, -/* 43 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var assign = __webpack_require__(50) - , normalizeOpts = __webpack_require__(57) - , isCallable = __webpack_require__(53) - , contains = __webpack_require__(60) + var assign = __webpack_require__(41) + , normalizeOpts = __webpack_require__(48) + , isCallable = __webpack_require__(44) + , contains = __webpack_require__(51) , d; @@ -4408,435 +4281,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = addEvent - - function addEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - events[type] = handler - } else if (Array.isArray(event)) { - if (event.indexOf(handler) === -1) { - event.push(handler) - } - } else if (event !== handler) { - events[type] = [event, handler] - } - } - - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - var globalDocument = __webpack_require__(14) - var EvStore = __webpack_require__(5) - var createStore = __webpack_require__(90) - - var addEvent = __webpack_require__(44) - var removeEvent = __webpack_require__(49) - var ProxyEvent = __webpack_require__(48) - - var HANDLER_STORE = createStore() - - module.exports = DOMDelegator - - function DOMDelegator(document) { - if (!(this instanceof DOMDelegator)) { - return new DOMDelegator(document); - } - - document = document || globalDocument - - this.target = document.documentElement - this.events = {} - this.rawEventListeners = {} - this.globalListeners = {} - } - - DOMDelegator.prototype.addEventListener = addEvent - DOMDelegator.prototype.removeEventListener = removeEvent - - DOMDelegator.allocateHandle = - function allocateHandle(func) { - var handle = new Handle() - - HANDLER_STORE(handle).func = func; - - return handle - } - - DOMDelegator.transformHandle = - function transformHandle(handle, broadcast) { - var func = HANDLER_STORE(handle).func - - return this.allocateHandle(function (ev) { - broadcast(ev, func); - }) - } - - DOMDelegator.prototype.addGlobalEventListener = - function addGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - if (listeners.indexOf(fn) === -1) { - listeners.push(fn) - } - - this.globalListeners[eventName] = listeners; - } - - DOMDelegator.prototype.removeGlobalEventListener = - function removeGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - - var index = listeners.indexOf(fn) - if (index !== -1) { - listeners.splice(index, 1) - } - } - - DOMDelegator.prototype.listenTo = function listenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - this.events[eventName]++; - - if (this.events[eventName] !== 1) { - return - } - - var listener = this.rawEventListeners[eventName] - if (!listener) { - listener = this.rawEventListeners[eventName] = - createHandler(eventName, this) - } - - this.target.addEventListener(eventName, listener, true) - } - - DOMDelegator.prototype.unlistenTo = function unlistenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - if (this.events[eventName] === 0) { - throw new Error("already unlistened to event."); - } - - this.events[eventName]--; - - if (this.events[eventName] !== 0) { - return - } - - var listener = this.rawEventListeners[eventName] - - if (!listener) { - throw new Error("dom-delegator#unlistenTo: cannot " + - "unlisten to " + eventName) - } - - this.target.removeEventListener(eventName, listener, true) - } - - function createHandler(eventName, delegator) { - var globalListeners = delegator.globalListeners; - var delegatorTarget = delegator.target; - - return handler - - function handler(ev) { - var globalHandlers = globalListeners[eventName] || [] - - if (globalHandlers.length > 0) { - var globalEvent = new ProxyEvent(ev); - globalEvent.currentTarget = delegatorTarget; - callListeners(globalHandlers, globalEvent) - } - - findAndInvokeListeners(ev.target, ev, eventName) - } - } - - function findAndInvokeListeners(elem, ev, eventName) { - var listener = getListener(elem, eventName) - - if (listener && listener.handlers.length > 0) { - var listenerEvent = new ProxyEvent(ev); - listenerEvent.currentTarget = listener.currentTarget - callListeners(listener.handlers, listenerEvent) - - if (listenerEvent._bubbles) { - var nextTarget = listener.currentTarget.parentNode - findAndInvokeListeners(nextTarget, ev, eventName) - } - } - } - - function getListener(target, type) { - // terminate recursion if parent is `null` - if (target === null || typeof target === "undefined") { - return null - } - - var events = EvStore(target) - // fetch list of handler fns for this event - var handler = events[type] - var allHandler = events.event - - if (!handler && !allHandler) { - return getListener(target.parentNode, type) - } - - var handlers = [].concat(handler || [], allHandler || []) - return new Listener(target, handlers) - } - - function callListeners(handlers, ev) { - handlers.forEach(function (handler) { - if (typeof handler === "function") { - handler(ev) - } else if (typeof handler.handleEvent === "function") { - handler.handleEvent(ev) - } else if (handler.type === "dom-delegator-handle") { - HANDLER_STORE(handler).func(ev) - } else { - throw new Error("dom-delegator: unknown handler " + - "found: " + JSON.stringify(handlers)); - } - }) - } - - function Listener(target, handlers) { - this.currentTarget = target - this.handlers = handlers - } - - function Handle() { - this.type = "dom-delegator-handle" - } - - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - var Individual = __webpack_require__(47) - var cuid = __webpack_require__(42) - var globalDocument = __webpack_require__(14) - - var DOMDelegator = __webpack_require__(45) - - var versionKey = "13" - var cacheKey = "__DOM_DELEGATOR_CACHE@" + versionKey - var cacheTokenKey = "__DOM_DELEGATOR_CACHE_TOKEN@" + versionKey - var delegatorCache = Individual(cacheKey, { - delegators: {} - }) - var commonEvents = [ - "blur", "change", "click", "contextmenu", "dblclick", - "error","focus", "focusin", "focusout", "input", "keydown", - "keypress", "keyup", "load", "mousedown", "mouseup", - "resize", "select", "submit", "touchcancel", - "touchend", "touchstart", "unload" - ] - - /* Delegator is a thin wrapper around a singleton `DOMDelegator` - instance. - - Only one DOMDelegator should exist because we do not want - duplicate event listeners bound to the DOM. - - `Delegator` will also `listenTo()` all events unless - every caller opts out of it - */ - module.exports = Delegator - - function Delegator(opts) { - opts = opts || {} - var document = opts.document || globalDocument - - var cacheKey = document[cacheTokenKey] - - if (!cacheKey) { - cacheKey = - document[cacheTokenKey] = cuid() - } - - var delegator = delegatorCache.delegators[cacheKey] - - if (!delegator) { - delegator = delegatorCache.delegators[cacheKey] = - new DOMDelegator(document) - } - - if (opts.defaultEvents !== false) { - for (var i = 0; i < commonEvents.length; i++) { - delegator.listenTo(commonEvents[i]) - } - } - - return delegator - } - - Delegator.allocateHandle = DOMDelegator.allocateHandle; - Delegator.transformHandle = DOMDelegator.transformHandle; - - -/***/ }, -/* 47 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {var root = typeof window !== 'undefined' ? - window : typeof global !== 'undefined' ? - global : {}; - - module.exports = Individual - - function Individual(key, value) { - if (root[key]) { - return root[key] - } - - Object.defineProperty(root, key, { - value: value - , configurable: true - }) - - return value - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - var inherits = __webpack_require__(65) - - var ALL_PROPS = [ - "altKey", "bubbles", "cancelable", "ctrlKey", - "eventPhase", "metaKey", "relatedTarget", "shiftKey", - "target", "timeStamp", "type", "view", "which" - ] - var KEY_PROPS = ["char", "charCode", "key", "keyCode"] - var MOUSE_PROPS = [ - "button", "buttons", "clientX", "clientY", "layerX", - "layerY", "offsetX", "offsetY", "pageX", "pageY", - "screenX", "screenY", "toElement" - ] - - var rkeyEvent = /^key|input/ - var rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/ - - module.exports = ProxyEvent - - function ProxyEvent(ev) { - if (!(this instanceof ProxyEvent)) { - return new ProxyEvent(ev) - } - - if (rkeyEvent.test(ev.type)) { - return new KeyEvent(ev) - } else if (rmouseEvent.test(ev.type)) { - return new MouseEvent(ev) - } - - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - this._rawEvent = ev - this._bubbles = false; - } - - ProxyEvent.prototype.preventDefault = function () { - this._rawEvent.preventDefault() - } - - ProxyEvent.prototype.startPropagation = function () { - this._bubbles = true; - } - - function MouseEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < MOUSE_PROPS.length; j++) { - var mousePropKey = MOUSE_PROPS[j] - this[mousePropKey] = ev[mousePropKey] - } - - this._rawEvent = ev - } - - inherits(MouseEvent, ProxyEvent) - - function KeyEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < KEY_PROPS.length; j++) { - var keyPropKey = KEY_PROPS[j] - this[keyPropKey] = ev[keyPropKey] - } - - this._rawEvent = ev - } - - inherits(KeyEvent, ProxyEvent) - - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = removeEvent - - function removeEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - return - } else if (Array.isArray(event)) { - var index = event.indexOf(handler) - if (index !== -1) { - event.splice(index, 1) - } - } else if (event === handler) { - events[type] = null - } - } - - -/***/ }, -/* 50 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(51)() + module.exports = __webpack_require__(42)() ? Object.assign - : __webpack_require__(52); + : __webpack_require__(43); /***/ }, -/* 51 */ +/* 42 */ /***/ function(module, exports) { 'use strict'; @@ -4851,13 +4307,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 52 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keys = __webpack_require__(54) - , value = __webpack_require__(59) + var keys = __webpack_require__(45) + , value = __webpack_require__(50) , max = Math.max; @@ -4879,7 +4335,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 53 */ +/* 44 */ /***/ function(module, exports) { // Deprecated @@ -4890,18 +4346,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 54 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(55)() + module.exports = __webpack_require__(46)() ? Object.keys - : __webpack_require__(56); + : __webpack_require__(47); /***/ }, -/* 55 */ +/* 46 */ /***/ function(module, exports) { 'use strict'; @@ -4915,7 +4371,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 56 */ +/* 47 */ /***/ function(module, exports) { 'use strict'; @@ -4928,7 +4384,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 57 */ +/* 48 */ /***/ function(module, exports) { 'use strict'; @@ -4951,7 +4407,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 58 */ +/* 49 */ /***/ function(module, exports) { 'use strict'; @@ -4963,7 +4419,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 59 */ +/* 50 */ /***/ function(module, exports) { 'use strict'; @@ -4975,18 +4431,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 60 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(61)() + module.exports = __webpack_require__(52)() ? String.prototype.contains - : __webpack_require__(62); + : __webpack_require__(53); /***/ }, -/* 61 */ +/* 52 */ /***/ function(module, exports) { 'use strict'; @@ -5000,7 +4456,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 62 */ +/* 53 */ /***/ function(module, exports) { 'use strict'; @@ -5013,7 +4469,33 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 63 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var OneVersionConstraint = __webpack_require__(56); + + var MY_VERSION = '7'; + OneVersionConstraint('ev-store', MY_VERSION); + + var hashKey = '__EV_STORE_KEY@' + MY_VERSION; + + module.exports = EvStore; + + function EvStore(elem) { + var hash = elem[hashKey]; + + if (!hash) { + hash = elem[hashKey] = {}; + } + + return hash; + } + + +/***/ }, +/* 55 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {'use strict'; @@ -5039,12 +4521,12 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 64 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Individual = __webpack_require__(63); + var Individual = __webpack_require__(55); module.exports = OneVersion; @@ -5067,36 +4549,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 65 */ -/***/ function(module, exports) { - - if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } - - -/***/ }, -/* 66 */ +/* 57 */ /***/ function(module, exports) { /** @@ -5150,7 +4603,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 67 */ +/* 58 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5596,7 +5049,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 68 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5607,8 +5060,8 @@ return /******/ (function(modules) { // webpackBootstrap * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keysIn = __webpack_require__(72), - rest = __webpack_require__(10); + var keysIn = __webpack_require__(63), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -5950,7 +5403,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 69 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5961,8 +5414,8 @@ return /******/ (function(modules) { // webpackBootstrap * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var assignInWith = __webpack_require__(68), - rest = __webpack_require__(10); + var assignInWith = __webpack_require__(59), + rest = __webpack_require__(9); /** * A faster alternative to `Function#apply`, this function invokes `func` @@ -6072,7 +5525,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 70 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6083,8 +5536,8 @@ return /******/ (function(modules) { // webpackBootstrap * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseFor = __webpack_require__(66), - keys = __webpack_require__(71); + var baseFor = __webpack_require__(57), + keys = __webpack_require__(62); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. @@ -6162,9 +5615,9 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 71 */ -67, -/* 72 */ +/* 62 */ +58, +/* 63 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -6616,7 +6069,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 73 */ +/* 64 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) { @@ -6654,7 +6107,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 74 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { // uuid.js @@ -6665,7 +6118,7 @@ return /******/ (function(modules) { // webpackBootstrap // Unique ID creation requires a high quality random # generator. We feature // detect to determine the best RNG source, normalizing to a function that // returns 128-bits of randomness, since that's what's usually required - var _rng = __webpack_require__(73); + var _rng = __webpack_require__(64); // Maps for number <-> hex string conversion var _byteToHex = []; @@ -6843,34 +6296,34 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 75 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { - var createElement = __webpack_require__(21) + var createElement = __webpack_require__(19) module.exports = createElement /***/ }, -/* 76 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { - var diff = __webpack_require__(89) + var diff = __webpack_require__(80) module.exports = diff /***/ }, -/* 77 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { - var patch = __webpack_require__(80) + var patch = __webpack_require__(71) module.exports = patch /***/ }, -/* 78 */ +/* 69 */ /***/ function(module, exports) { // Maps a virtual DOM tree onto a real DOM tree in an efficient manner. @@ -6961,15 +6414,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 79 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isWidget = __webpack_require__(2) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) - var updateWidget = __webpack_require__(81) + var updateWidget = __webpack_require__(72) module.exports = applyPatch @@ -7118,15 +6571,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 80 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) - var isArray = __webpack_require__(12) + var document = __webpack_require__(17) + var isArray = __webpack_require__(11) - var render = __webpack_require__(21) - var domIndex = __webpack_require__(78) - var patchOp = __webpack_require__(79) + var render = __webpack_require__(19) + var domIndex = __webpack_require__(69) + var patchOp = __webpack_require__(70) module.exports = patch function patch(rootNode, patches, renderOptions) { @@ -7204,7 +6657,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 81 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { var isWidget = __webpack_require__(2) @@ -7225,12 +6678,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 82 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var EvStore = __webpack_require__(5); + var EvStore = __webpack_require__(54); module.exports = EvHook; @@ -7258,7 +6711,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 83 */ +/* 74 */ /***/ function(module, exports) { 'use strict'; @@ -7281,24 +6734,24 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 84 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var isArray = __webpack_require__(12); + var isArray = __webpack_require__(11); - var VNode = __webpack_require__(86); - var VText = __webpack_require__(87); + var VNode = __webpack_require__(77); + var VText = __webpack_require__(78); var isVNode = __webpack_require__(3); - var isVText = __webpack_require__(8); + var isVText = __webpack_require__(7); var isWidget = __webpack_require__(2); - var isHook = __webpack_require__(7); - var isVThunk = __webpack_require__(6); + var isHook = __webpack_require__(6); + var isVThunk = __webpack_require__(5); - var parseTag = __webpack_require__(85); - var softSetHook = __webpack_require__(83); - var evHook = __webpack_require__(82); + var parseTag = __webpack_require__(76); + var softSetHook = __webpack_require__(74); + var evHook = __webpack_require__(73); module.exports = h; @@ -7424,12 +6877,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 85 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var split = __webpack_require__(41); + var split = __webpack_require__(39); var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/; var notClassId = /^\.|#/; @@ -7484,14 +6937,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 86 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) var isVNode = __webpack_require__(3) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var isVHook = __webpack_require__(7) + var isThunk = __webpack_require__(5) + var isVHook = __webpack_require__(6) module.exports = VirtualNode @@ -7562,7 +7015,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 87 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -7578,11 +7031,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 88 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = diffProps @@ -7642,19 +7095,19 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(12) + var isArray = __webpack_require__(11) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var handleThunk = __webpack_require__(22) + var isThunk = __webpack_require__(5) + var handleThunk = __webpack_require__(20) - var diffProps = __webpack_require__(88) + var diffProps = __webpack_require__(79) module.exports = diff @@ -8075,54 +7528,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 90 */ -/***/ function(module, exports, __webpack_require__) { - - var hiddenStore = __webpack_require__(91); - - module.exports = createStore; - - function createStore() { - var key = {}; - - return function (obj) { - if ((typeof obj !== 'object' || obj === null) && - typeof obj !== 'function' - ) { - throw new Error('Weakmap-shim: Key must be object') - } - - var store = obj.valueOf(key); - return store && store.identity === key ? - store : hiddenStore(obj, key); - }; - } - - -/***/ }, -/* 91 */ -/***/ function(module, exports) { - - module.exports = hiddenStore; - - function hiddenStore(obj, key) { - var store = { identity: key }; - var valueOf = obj.valueOf; - - Object.defineProperty(obj, "valueOf", { - value: function (value) { - return value !== key ? - valueOf.apply(this, arguments) : store; - }, - writable: true - }); - - return store; - } - - -/***/ }, -/* 92 */ +/* 81 */ /***/ function(module, exports) { 'use strict'; @@ -8278,7 +7684,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 93 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { module.exports = function() { @@ -8286,35 +7692,11 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 94 */ +/* 83 */ /***/ function(module, exports) { /* (ignored) */ -/***/ }, -/* 95 */ -94, -/* 96 */ -/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { - - /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : - typeof window !== 'undefined' ? window : {} - var minDoc = __webpack_require__(__webpack_module_template_argument_0__); - - if (typeof document !== 'undefined') { - module.exports = document; - } else { - var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } - - module.exports = doccy; - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - /***/ } /******/ ]))) }); diff --git a/dist/js/waveform-playlist.umd.min.js b/dist/js/waveform-playlist.umd.min.js index 318a87fb..d5c4c9d4 100644 --- a/dist/js/waveform-playlist.umd.min.js +++ b/dist/js/waveform-playlist.umd.min.js @@ -1,8 +1,8 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WaveformPlaylist=t():e.WaveformPlaylist=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?(0,h["default"])():arguments[1],r=arguments.length<=2||void 0===arguments[2]?(0,l["default"])():arguments[2];if(void 0===e.container)throw new Error("DOM element container must be given.");var i=new(window.AudioContext||window.webkitAudioContext),o={jsLocation:"js/",ac:i,sampleRate:i.sampleRate,samplesPerPixel:4096,mono:!0,fadeType:"logarithmic",timescale:!1,controls:{show:!1,width:150},colors:{waveOutlineColor:"white",timeColor:"grey",fadeColor:"black"},waveHeight:128,state:"cursor",zoomLevels:[512,1024,2048,4096]},s=(0,a["default"])(o,e),c=s.zoomLevels.indexOf(s.samplesPerPixel);if(-1===c)throw new Error("initial samplesPerPixel must be included in array zoomLevels");var f=new p["default"];f.setSampleRate(s.sampleRate),f.setSamplesPerPixel(s.samplesPerPixel),f.setAudioContext(s.ac),f.setEventEmitter(t),f.setUpEventEmitter(),f.setTimeSelection(0,0),f.setState(s.state),f.setControlOptions(s.controls),f.setWaveHeight(s.waveHeight),f.setColors(s.colors),f.setZoomLevels(s.zoomLevels),f.setZoomIndex(c),f.setMono(s.mono);var d=f.render(),v=(0,u["default"])(d);return s.container.appendChild(v),f.tree=d,f.rootNode=v,r.listenTo("scroll"),n.p=s.jsLocation,f}Object.defineProperty(t,"__esModule",{value:!0}),t.init=i;var o=n(18),a=r(o),s=n(75),u=r(s),c=n(46),l=r(c),f=n(15),h=r(f),d=n(24),p=r(d)},function(e,t){"use strict";function n(e,t){return e/t}function r(e,t){return Math.ceil(e*t)}function i(e,t){return~~(e/t)}function o(e,t){return~~(e*t)}function a(e,t,n){return e*t/n}function s(e,t,n){return Math.ceil(e*n/t)}Object.defineProperty(t,"__esModule",{value:!0}),t.samplesToSeconds=n,t.secondsToSamples=r,t.samplesToPixels=i,t.pixelsToSamples=o,t.pixelsToSeconds=a,t.secondsToPixels=s},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(64),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){function n(e){return e&&"Thunk"===e.type}e.exports=n},function(e,t){function n(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualText"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=(0,d.sCurve)(1e4,1);this.setValueCurveAtTime(n,e,t)}function i(e,t){var n=(0,d.sCurve)(1e4,-1);this.setValueCurveAtTime(n,e,t)}function o(e,t){this.linearRampToValueAtTime(0,e),this.linearRampToValueAtTime(1,e+t)}function a(e,t){this.linearRampToValueAtTime(1,e),this.linearRampToValueAtTime(0,e+t)}function s(e,t){this.exponentialRampToValueAtTime(.01,e),this.exponentialRampToValueAtTime(1,e+t)}function u(e,t){this.exponentialRampToValueAtTime(1,e),this.exponentialRampToValueAtTime(.01,e+t)}function c(e,t){var n=(0,d.logarithmic)(1e4,10,1);this.setValueCurveAtTime(n,e,t)}function l(e,t){var n=(0,d.logarithmic)(1e4,10,-1);this.setValueCurveAtTime(n,e,t)}function f(e,t,n,i){switch(t){case p:r.call(e,n,i);break;case v:o.call(e,n,i);break;case m:s.call(e,n,i);break;case y:c.call(e,n,i);break;default:throw new Error("Unsupported Fade type")}}function h(e,t,n,r){switch(t){case p:i.call(e,n,r);break;case v:a.call(e,n,r);break;case m:u.call(e,n,r);break;case y:l.call(e,n,r);break;default:throw new Error("Unsupported Fade type")}}Object.defineProperty(t,"__esModule",{value:!0}),t.FADEOUT=t.FADEIN=t.LOGARITHMIC=t.EXPONENTIAL=t.LINEAR=t.SCURVE=void 0,t.createFadeIn=f,t.createFadeOut=h;var d=n(16),p=t.SCURVE="sCurve",v=t.LINEAR="linear",m=t.EXPONENTIAL="exponential",y=t.LOGARITHMIC="logarithmic";t.FADEIN="FadeIn",t.FADEOUT="FadeOut"},function(e,t){(function(t){function n(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){if("function"!=typeof e)throw new TypeError(u);return t=w(void 0===t?e.length-1:a(t),0),function(){for(var r=arguments,i=-1,o=w(r.length-t,0),a=Array(o);++ie?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,b=t.Object.prototype,k=b.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(84);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;n>t;++t)o[t-1]=arguments[t];h.call(i,this,o)}},s={on:r,once:i,off:o,emit:a},u={on:l(r),once:l(i),off:l(o),emit:l(a)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,o=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,i=t>0?n:e-1-n,o[i]=Math.exp(2*r-1)/Math.exp(1);return o}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function o(e,t,n){var r,i,o=new Float32Array(e),a=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,a=i/e,o[r]=Math.log(1+t*a)/Math.log(1+t);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=o},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!x.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&c(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(67),m=n(10),y=9007199254740991,g="[object Function]",b="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,x=w.hasOwnProperty,P=w.toString,T=o("length"),O=u(function(e,t){a(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},[96,95],function(e,t,n){function r(e,t,n){for(var r in t){var a=t[r];void 0===a?i(e,r,a,n):u(a)?(i(e,r,a,n),a.hook&&a.hook(e,r,n?n[r]:void 0)):s(a)?o(e,t,n,r,a):e[r]=a}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var o in i)e.removeAttribute(o);else if("style"===t)for(var a in i)e.style[a]="";else"string"==typeof i?e[t]="":e[t]=null}}function o(e,t,n,r,i){var o=n?n[r]:void 0;if("attributes"!==r){if(o&&s(o)&&a(o)!==a(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function a(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(17),u=n(7);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!a(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;o(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,void 0))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),o=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.tracks.forEach(function(i){i.setState("cursor"),o.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=o,this.startAnimation(e),Promise.all(this.playoutPromises)}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},"ev-scroll":function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,a.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,a.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},o=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(o.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[o,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var o=n>e?n:e,a=t>r?r:t;this.setCues(o+i,a+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(P.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(P.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,o,a,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,o=Math.min(f,this.duration)):o=this.duration):(i=t-this.startTime,o=n?Math.min(f,this.duration-i):this.duration-i), -i+=this.cueIn,a=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(at.start&&a1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),o=n.getEvents();Object.keys(o).map(function(e){r["ev-"+e]=o[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{"ev-click":function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{"ev-click":function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},"ev-input":function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),o=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),a=0,s=this.peaks.data.length;r>0&&r>i&&(a=o>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var o=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+a+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);o.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new k["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new x["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new x["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},o)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var o=Math.abs(r*t),a=Math.abs(i*t);e.fillRect(n,0,1,t-a),e.fillRect(n,t+o,1,t-o)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(a,s,i,c,l)}}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function o(e,t,n,r,o){var a=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",a=i(t,n,r),c=o-a[0]*o,e.beginPath(),e.moveTo(0,c),s=1,u=a.length;u>s;s++)c=o-a[s]*o,e.lineTo(s,c);e.stroke()}var a=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&ne?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(a(e)){var t=i(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,k=t.Object.prototype,b=k.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(75);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt;++t)a[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,a)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,a=new Array(n-1),t=1;n>t;++t)a[t-1]=arguments[t];h.call(i,this,a)}},s={on:r,once:i,off:a,emit:o},u={on:l(r),once:l(i),off:l(a),emit:l(o)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,a=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,i=t>0?n:e-1-n,a[i]=Math.exp(2*r-1)/Math.exp(1);return a}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function a(e,t,n){var r,i,a=new Float32Array(e),o=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,o=i/e,a[r]=Math.log(1+t*o)/Math.log(1+t);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=a},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!P.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&c(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(58),m=n(9),y=9007199254740991,g="[object Function]",k="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,P=w.hasOwnProperty,x=w.toString,T=a("length"),O=u(function(e,t){o(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(83);if("undefined"!=typeof document)e.exports=document;else{var a=r["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=a}}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){for(var r in t){var o=t[r];void 0===o?i(e,r,o,n):u(o)?(i(e,r,o,n),o.hook&&o.hook(e,r,n?n[r]:void 0)):s(o)?a(e,t,n,r,o):e[r]=o}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var a in i)e.removeAttribute(a);else if("style"===t)for(var o in i)e.style[o]="";else"string"==typeof i?e[t]="":e[t]=null}}function a(e,t,n,r,i){var a=n?n[r]:void 0;if("attributes"!==r){if(a&&s(a)&&o(a)!==o(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function o(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(15),u=n(6);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!o(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;a(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e,t){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,t))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),a=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.isPlaying()?void this.restartPlayFrom(e,t):(this.tracks.forEach(function(i){i.setState("cursor"),a.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=a,this.startAnimation(e),Promise.all(this.playoutPromises))}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},onscroll:function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,o.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,o.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},a=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(a.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[a,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var a=n>e?n:e,o=t>r?r:t;this.setCues(a+i,o+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(x.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(x.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,a,o,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,a=Math.min(f,this.duration)):a=this.duration):(i=t-this.startTime, +a=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,o=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(ot.start&&o1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),a=n.getEvents();Object.keys(a).map(function(e){r["on"+e]=a[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{onclick:function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{onclick:function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},oninput:function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),a=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),o=0,s=this.peaks.data.length;r>0&&r>i&&(o=a>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var a=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+o+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);a.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new b["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new P["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new P["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},a)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var a=Math.abs(r*t),o=Math.abs(i*t);e.fillRect(n,0,1,t-o),e.fillRect(n,t+a,1,t-a)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(o,s,i,c,l)}}}]),e}();t["default"]=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function a(e,t,n,r,a){var o=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",o=i(t,n,r),c=a-o[0]*a,e.beginPath(),e.moveTo(0,c),s=1,u=o.length;u>s;s++)c=a-o[s]*a,e.lineTo(s,c);e.stroke()}var o=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&n * Available under the MIT License * ECMAScript compliant, uniform cross-browser split method */ -e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(a,function(){for(var t=1;t1&&s.index=o)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>o?l.slice(0,o):l}}()},function(e,t,n){!function(t){"use strict";var n="cuid",r=0,i=4,o=36,a=Math.pow(o,i),s=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},u=function(){return s((Math.random()*a<<0).toString(o),i)},c=function(){return r=a>r?r:0,r++,r-1},l=function(){var e,t="c",n=(new Date).getTime().toString(o),r=l.fingerprint(),a=u()+u();return e=s(c().toString(o),i),t+n+e+r+a};l.slug=function(){var e,t=(new Date).getTime().toString(36),n=l.fingerprint().slice(0,1)+l.fingerprint().slice(-1),r=u().slice(-2);return e=c().toString(36).slice(-4),t.slice(-2)+e+n+r},l.globalCount=function(){var e=function(){var e,t=0;for(e in window)t++;return t}();return l.globalCount=function(){return e},e},l.fingerprint=function(){return s((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+l.globalCount().toString(36),4)},t.register?t.register(n,l):e.exports=l}(this.applitude||this)},function(e,t,n){"use strict";var r,i=n(50),o=n(57),a=n(53),s=n(60);r=e.exports=function(e,t){var n,r,a,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=a=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),a=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:a},u?i(o(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:a(t)?null==n?n=void 0:a(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(o(c),l):l}},function(e,t,n){function r(e,t,n){var r=i(e),o=r[t];o?Array.isArray(o)?-1===o.indexOf(n)&&o.push(n):o!==n&&(r[t]=[o,n]):r[t]=n}var i=n(5);e.exports=r},function(e,t,n){function r(e){return this instanceof r?(e=e||l,this.target=e.documentElement,this.events={},this.rawEventListeners={},void(this.globalListeners={})):new r(e)}function i(e,t){function n(t){var n=r[e]||[];if(n.length>0){var a=new v(t);a.currentTarget=i,s(n,a)}o(t.target,t,e)}var r=t.globalListeners,i=t.target;return n}function o(e,t,n){var r=a(e,n);if(r&&r.handlers.length>0){var i=new v(t);if(i.currentTarget=r.currentTarget,s(r.handlers,i),i._bubbles){var u=r.currentTarget.parentNode;o(u,t,n)}}}function a(e,t){if(null===e||"undefined"==typeof e)return null;var n=f(e),r=n[t],i=n.event;if(!r&&!i)return a(e.parentNode,t);var o=[].concat(r||[],i||[]);return new u(e,o)}function s(e,t){e.forEach(function(n){if("function"==typeof n)n(t);else if("function"==typeof n.handleEvent)n.handleEvent(t);else{if("dom-delegator-handle"!==n.type)throw new Error("dom-delegator: unknown handler found: "+JSON.stringify(e));m(n).func(t)}})}function u(e,t){this.currentTarget=e,this.handlers=t}function c(){this.type="dom-delegator-handle"}var l=n(14),f=n(5),h=n(90),d=n(44),p=n(49),v=n(48),m=h();e.exports=r,r.prototype.addEventListener=d,r.prototype.removeEventListener=p,r.allocateHandle=function(e){var t=new c;return m(t).func=e,t},r.transformHandle=function(e,t){var n=m(e).func;return this.allocateHandle(function(e){t(e,n)})},r.prototype.addGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[];-1===n.indexOf(t)&&n.push(t),this.globalListeners[e]=n},r.prototype.removeGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[],r=n.indexOf(t);-1!==r&&n.splice(r,1)},r.prototype.listenTo=function(e){if(e in this.events||(this.events[e]=0),this.events[e]++,1===this.events[e]){var t=this.rawEventListeners[e];t||(t=this.rawEventListeners[e]=i(e,this)),this.target.addEventListener(e,t,!0)}},r.prototype.unlistenTo=function(e){if(e in this.events||(this.events[e]=0),0===this.events[e])throw new Error("already unlistened to event.");if(this.events[e]--,0===this.events[e]){var t=this.rawEventListeners[e];if(!t)throw new Error("dom-delegator#unlistenTo: cannot unlisten to "+e);this.target.removeEventListener(e,t,!0)}}},function(e,t,n){function r(e){e=e||{};var t=e.document||a,n=t[l];n||(n=t[l]=o());var r=f.delegators[n];if(r||(r=f.delegators[n]=new s(t)),e.defaultEvents!==!1)for(var i=0;ia;++a)t=arguments[a],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(55)()?Object.keys:n(56)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(61)()?String.prototype.contains:n(62)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,o=r+"_ENFORCE_SINGLETON",a=i(o,t);if(a!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+a+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(63);e.exports=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function o(e){return j(Object(e))}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){var t=u(e);if(!t&&!l(e))return o(e);var n=s(e),a=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||a&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,b="[object Arguments]",k="[object Function]",w="[object GeneratorFunction]",x="[object String]",P=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,A=a("length"),R=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,k[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&u(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(72),v=n(10),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,k=t.Object.prototype,w=k.hasOwnProperty,x=k.toString,P=o("length"),T=s(function(e,t,n){a(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||o(e,u[n])&&!c.call(r,n)?t:e}function o(e,t){return e===t||e!==e&&t!==t}var a=n(68),s=n(10),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(a,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:a}function o(e,t){return e&&r(e,i(t))}function a(e){return e}var s=n(66),u=n(71);e.exports=o},67,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function o(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){for(var t=-1,n=u(e),i=o(e),a=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function o(e,t,n){var r=t&&n||0,o=t||[];e=e||{};var a=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(a=a+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=a,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;o[r++]=l>>>24&255,o[r++]=l>>>16&255,o[r++]=l>>>8&255,o[r++]=255&l;var f=s/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var m=e.node||h,y=0;6>y;y++)o[r+y]=m[y];return t?t:i(o)}function a(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;16>a;a++)t[r+a]=o[a];return t||i(o)}for(var s=n(73),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=a;m.v1=o,m.v4=a,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(21);e.exports=r},function(e,t,n){var r=n(89);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(o),r(e,t,n,i,0)):{}}function r(e,t,n,o,s){if(o=o||{},e){i(n,s,s)&&(o[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=o;){if(r=(a+o)/2>>0,i=e[r],o===a)return i>=t&&n>=i;if(t>i)o=r+1;else{if(!(i>n))return!0;a=r-1}}return!1}function o(e,t){return e>t?1:-1}var a={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return o(t,d,n);case p.VTEXT:return a(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function o(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function a(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var o=e.parentNode;i=r.render(n,r),o&&i!==e&&o.replaceChild(i,e)}return i}function s(e,t,n,r){var i,o=v(t,n);i=o?n.update(t,e)||e:r.render(n,r);var a=e.parentNode;return a&&i!==e&&a.replaceChild(i,e),o||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,o=r.render(n,r);return i&&o!==e&&i.replaceChild(o,e),o}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,o=e.childNodes,a={},s=0;s=u++?null:o[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(20),d=n(2),p=n(23),v=n(81);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=a(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;cb;b++){var k=n[b];o(k)?(d+=k.count||0,!p&&k.hasWidgets&&(p=!0),!v&&k.hasThunks&&(v=!0),m||!k.hooks&&!k.descendantHooks||(m=!0)):!p&&a(k)?"function"==typeof k.destroy&&(p=!0):!v&&s(k)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),o=n(3),a=n(2),s=n(6),u=n(7);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(o(u)&&o(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(a(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var o=n(17),a=n(7);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)k(e)||(a(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=P(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=o(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else b(t)?b(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):k(t)&&(k(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&a(e,n,r)}}function o(e,t,n,r,o){for(var a=e.children,s=h(a,t.children),u=s.children,c=a.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=a[d],m=u[d];o+=1,p?i(p,m,n,o):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(o+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function a(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(k(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,s(a,t,n),g(a)&&a.count&&(n+=a.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var o=x(e,t),a=r(o.a,o.b);c(a)&&(n[i]=new y(y.THUNK,null,a))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,l(a,t,n),g(a)&&a.count&&(n+=a.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var o=p(e),a=o.keys,s=o.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(b)}for(var k,w=u.slice(),x=0,P=[],T=[],O=0;Oi;i++){var o=e[i];o.key?t[o.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(12),y=n(23),g=n(3),b=n(8),k=n(2),w=n(6),x=n(22),P=n(88);e.exports=r},function(e,t,n){function r(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:i(t,e)}}var i=n(91);e.exports=r},function(e,t){function n(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}e.exports=n},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,o=e.length;o>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,o){if(t=t||1e4,o=o||8,n=n||!0,[8,16,32].indexOf(o)<0)throw new Error("Invalid number of bits specified for peaks.");var a,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(a=0;l>a;a++)u=e.getChannelData(a),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,o));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,o));return n&&f.length>1&&(f=makeMono(f,o)),s=f[0].length/2,{length:s,data:f,bits:o}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){},94,function(e,t,n,r){(function(t){var i="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},o=n(r);if("undefined"!=typeof document)e.exports=document;else{var a=i["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=a}}).call(t,function(){return this}())}]))}); \ No newline at end of file +e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,a){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,a);var o,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(o=new RegExp("^"+i.source+"$(?!\\s)",f)),a=a===e?-1>>>0:a>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(o,function(){for(var t=1;t1&&s.index=a)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>a?l.slice(0,a):l}}()},function(e,t,n){"use strict";var r,i=n(41),a=n(48),o=n(44),s=n(51);r=e.exports=function(e,t){var n,r,o,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=o=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),o=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:o},u?i(a(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:o(t)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(a(c),l):l}},function(e,t,n){"use strict";e.exports=n(42)()?Object.assign:n(43)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"!=typeof t?!1:(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(45),i=n(50),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},o=1;u>o;++o)t=arguments[o],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(46)()?Object.keys:n(47)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(52)()?String.prototype.contains:n(53)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";function r(e){var t=e[o];return t||(t=e[o]={}),t}var i=n(56),a="7";i("ev-store",a);var o="__EV_STORE_KEY@"+a;e.exports=r},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,a=r+"_ENFORCE_SINGLETON",o=i(a,t);if(o!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+o+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(55);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(n(a[u],u,a)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function a(e){return j(Object(e))}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){var t=u(e);if(!t&&!l(e))return a(e);var n=s(e),o=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||o&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,k="[object Arguments]",b="[object Function]",w="[object GeneratorFunction]",P="[object String]",x=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,R=o("length"),A=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,b[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&u(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(63),v=n(9),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,b=t.Object.prototype,w=b.hasOwnProperty,P=b.toString,x=a("length"),T=s(function(e,t,n){o(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||a(e,u[n])&&!c.call(r,n)?t:e}function a(e,t){return e===t||e!==e&&t!==t}var o=n(59),s=n(9),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(o,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:o}function a(e,t){return e&&r(e,i(t))}function o(e){return e}var s=n(57),u=n(62);e.exports=a},58,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){for(var t=-1,n=u(e),i=a(e),o=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function a(e,t,n){var r=t&&n||0,a=t||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(o=o+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=o,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;a[r++]=l>>>24&255,a[r++]=l>>>16&255,a[r++]=l>>>8&255,a[r++]=255&l;var f=s/4294967296*1e4&268435455;a[r++]=f>>>8&255,a[r++]=255&f,a[r++]=f>>>24&15|16,a[r++]=f>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=e.node||h,y=0;6>y;y++)a[r+y]=m[y];return t?t:i(a)}function o(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;16>o;o++)t[r+o]=a[o];return t||i(a)}for(var s=n(64),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=o;m.v1=a,m.v4=o,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(19);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t,n){var r=n(71);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(a),r(e,t,n,i,0)):{}}function r(e,t,n,a,s){if(a=a||{},e){i(n,s,s)&&(a[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=a;){if(r=(o+a)/2>>0,i=e[r],a===o)return i>=t&&n>=i;if(t>i)a=r+1;else{if(!(i>n))return!0;o=r-1}}return!1}function a(e,t){return e>t?1:-1}var o={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return a(t,d,n);case p.VTEXT:return o(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function a(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function o(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var a=e.parentNode;i=r.render(n,r),a&&i!==e&&a.replaceChild(i,e)}return i}function s(e,t,n,r){var i,a=v(t,n);i=a?n.update(t,e)||e:r.render(n,r);var o=e.parentNode;return o&&i!==e&&o.replaceChild(i,e),a||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,a=r.render(n,r);return i&&a!==e&&i.replaceChild(a,e),a}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,a=e.childNodes,o={},s=0;s=u++?null:a[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(18),d=n(2),p=n(21),v=n(72);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=o(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;ck;k++){var b=n[k];a(b)?(d+=b.count||0,!p&&b.hasWidgets&&(p=!0),!v&&b.hasThunks&&(v=!0),m||!b.hooks&&!b.descendantHooks||(m=!0)):!p&&o(b)?"function"==typeof b.destroy&&(p=!0):!v&&s(b)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),a=n(3),o=n(2),s=n(5),u=n(6);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(a(u)&&a(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(o(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var a=n(15),o=n(6);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)b(e)||(o(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=x(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=a(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else k(t)?k(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):b(t)&&(b(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&o(e,n,r)}}function a(e,t,n,r,a){for(var o=e.children,s=h(o,t.children),u=s.children,c=o.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=o[d],m=u[d];a+=1,p?i(p,m,n,a):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(a+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function o(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(b(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,s(o,t,n),g(o)&&o.count&&(n+=o.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var a=P(e,t),o=r(a.a,a.b);c(o)&&(n[i]=new y(y.THUNK,null,o))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,l(o,t,n),g(o)&&o.count&&(n+=o.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var a=p(e),o=a.keys,s=a.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(k)}for(var b,w=u.slice(),P=0,x=[],T=[],O=0;Oi;i++){var a=e[i];a.key?t[a.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(11),y=n(21),g=n(3),k=n(7),b=n(2),w=n(5),P=n(20),x=n(79);e.exports=r},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,a=e.length;a>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,a){if(t=t||1e4,a=a||8,n=n||!0,[8,16,32].indexOf(a)<0)throw new Error("Invalid number of bits specified for peaks.");var o,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(o=0;l>o;o++)u=e.getChannelData(o),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,a));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,a));return n&&f.length>1&&(f=makeMono(f,a)),s=f[0].length/2,{length:s,data:f,bits:a}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){}]))}); \ No newline at end of file diff --git a/dist/js/waveform-playlist.var.js b/dist/js/waveform-playlist.var.js index 0c987789..1c31ba48 100644 --- a/dist/js/waveform-playlist.var.js +++ b/dist/js/waveform-playlist.var.js @@ -75,23 +75,19 @@ var WaveformPlaylist = }); exports.init = init; - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _createElement = __webpack_require__(75); + var _createElement = __webpack_require__(66); var _createElement2 = _interopRequireDefault(_createElement); - var _domDelegator = __webpack_require__(46); - - var _domDelegator2 = _interopRequireDefault(_domDelegator); - - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); - var _Playlist = __webpack_require__(24); + var _Playlist = __webpack_require__(22); var _Playlist2 = _interopRequireDefault(_Playlist); @@ -100,7 +96,6 @@ var WaveformPlaylist = function init() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var ee = arguments.length <= 1 || arguments[1] === undefined ? (0, _eventEmitter2.default)() : arguments[1]; - var delegator = arguments.length <= 2 || arguments[2] === undefined ? (0, _domDelegator2.default)() : arguments[2]; if (options.container === undefined) { throw new Error("DOM element container must be given."); @@ -160,9 +155,6 @@ var WaveformPlaylist = playlist.tree = tree; playlist.rootNode = rootNode; - //have to add extra events that aren't followed by default. - delegator.listenTo("scroll"); - __webpack_require__.p = config.jsLocation; return playlist; @@ -240,32 +232,6 @@ var WaveformPlaylist = /***/ }, /* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var OneVersionConstraint = __webpack_require__(64); - - var MY_VERSION = '7'; - OneVersionConstraint('ev-store', MY_VERSION); - - var hashKey = '__EV_STORE_KEY@' + MY_VERSION; - - module.exports = EvStore; - - function EvStore(elem) { - var hash = elem[hashKey]; - - if (!hash) { - hash = elem[hashKey] = {}; - } - - return hash; - } - - -/***/ }, -/* 6 */ /***/ function(module, exports) { module.exports = isThunk @@ -276,7 +242,7 @@ var WaveformPlaylist = /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { module.exports = isHook @@ -289,7 +255,7 @@ var WaveformPlaylist = /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -302,7 +268,7 @@ var WaveformPlaylist = /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -314,7 +280,7 @@ var WaveformPlaylist = exports.createFadeIn = createFadeIn; exports.createFadeOut = createFadeOut; - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); var SCURVE = exports.SCURVE = "sCurve"; var LINEAR = exports.LINEAR = "linear"; @@ -404,7 +370,7 @@ var WaveformPlaylist = /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -660,16 +626,16 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { - var h = __webpack_require__(84) + var h = __webpack_require__(75) module.exports = h /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports) { var nativeIsArray = Array.isArray @@ -683,7 +649,7 @@ var WaveformPlaylist = /***/ }, -/* 13 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -695,7 +661,7 @@ var WaveformPlaylist = }); exports.STATE_FINISHED = exports.STATE_DECODING = exports.STATE_LOADING = exports.STATE_UNINITIALIZED = undefined; - var _eventEmitter = __webpack_require__(15); + var _eventEmitter = __webpack_require__(13); var _eventEmitter2 = _interopRequireDefault(_eventEmitter); @@ -765,15 +731,13 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 14 */ -[96, 94], -/* 15 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var d = __webpack_require__(43) - , callable = __webpack_require__(58) + var d = __webpack_require__(40) + , callable = __webpack_require__(49) , apply = Function.prototype.apply, call = Function.prototype.call , create = Object.create, defineProperty = Object.defineProperty @@ -905,7 +869,7 @@ var WaveformPlaylist = /***/ }, -/* 16 */ +/* 14 */ /***/ function(module, exports) { 'use strict'; @@ -985,7 +949,7 @@ var WaveformPlaylist = /***/ }, -/* 17 */ +/* 15 */ /***/ function(module, exports) { "use strict"; @@ -996,7 +960,7 @@ var WaveformPlaylist = /***/ }, -/* 18 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -1007,8 +971,8 @@ var WaveformPlaylist = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keys = __webpack_require__(67), - rest = __webpack_require__(10); + var keys = __webpack_require__(58), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -1366,13 +1330,33 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 19 */ -[96, 95], -/* 20 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} + var minDoc = __webpack_require__(83); + + if (typeof document !== 'undefined') { + module.exports = document; + } else { + var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } + + module.exports = doccy; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = applyProperties @@ -1471,17 +1455,17 @@ var WaveformPlaylist = /***/ }, -/* 21 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) + var document = __webpack_require__(17) - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var handleThunk = __webpack_require__(22) + var handleThunk = __webpack_require__(20) module.exports = createElement @@ -1523,13 +1507,13 @@ var WaveformPlaylist = /***/ }, -/* 22 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) + var isThunk = __webpack_require__(5) module.exports = handleThunk @@ -1569,7 +1553,7 @@ var WaveformPlaylist = /***/ }, -/* 23 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -1597,7 +1581,7 @@ var WaveformPlaylist = /***/ }, -/* 24 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -1608,45 +1592,45 @@ var WaveformPlaylist = value: true }); - var _lodash = __webpack_require__(69); + var _lodash = __webpack_require__(60); var _lodash2 = _interopRequireDefault(_lodash); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _diff = __webpack_require__(76); + var _diff = __webpack_require__(67); var _diff2 = _interopRequireDefault(_diff); - var _patch = __webpack_require__(77); + var _patch = __webpack_require__(68); var _patch2 = _interopRequireDefault(_patch); var _conversions = __webpack_require__(1); - var _LoaderFactory = __webpack_require__(33); + var _LoaderFactory = __webpack_require__(31); var _LoaderFactory2 = _interopRequireDefault(_LoaderFactory); - var _ScrollHook = __webpack_require__(30); + var _ScrollHook = __webpack_require__(28); var _ScrollHook2 = _interopRequireDefault(_ScrollHook); - var _TimeScale = __webpack_require__(26); + var _TimeScale = __webpack_require__(24); var _TimeScale2 = _interopRequireDefault(_TimeScale); - var _Track = __webpack_require__(27); + var _Track = __webpack_require__(25); var _Track2 = _interopRequireDefault(_Track); - var _Playout = __webpack_require__(25); + var _Playout = __webpack_require__(23); var _Playout2 = _interopRequireDefault(_Playout); - var _recorderWorker = __webpack_require__(93); + var _recorderWorker = __webpack_require__(82); var _recorderWorker2 = _interopRequireDefault(_recorderWorker); @@ -2121,14 +2105,14 @@ var WaveformPlaylist = } }, { key: 'restartPlayFrom', - value: function restartPlayFrom(cursorPos) { + value: function restartPlayFrom(start, end) { this.stopAnimation(); this.tracks.forEach(function (editor) { editor.scheduleStop(); }); - return Promise.all(this.playoutPromises).then(this.play.bind(this, cursorPos, undefined)); + return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end)); } }, { key: 'play', @@ -2145,6 +2129,11 @@ var WaveformPlaylist = endTime = selected.end; } + if (this.isPlaying()) { + this.restartPlayFrom(startTime, endTime); + return; + } + this.tracks.forEach(function (track) { track.setState('cursor'); playoutPromises.push(track.schedulePlay(currentTime, startTime, endTime, { @@ -2338,7 +2327,7 @@ var WaveformPlaylist = "attributes": { "style": "overflow: auto;" }, - "ev-scroll": function evScroll(e) { + "onscroll": function onscroll(e) { _this12.scrollLeft = (0, _conversions.pixelsToSeconds)(e.target.scrollLeft, _this12.samplesPerPixel, _this12.sampleRate); _this12.ee.emit("scroll", _this12.scrollLeft); }, @@ -2364,7 +2353,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 25 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2375,7 +2364,7 @@ var WaveformPlaylist = value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2507,7 +2496,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 26 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2520,11 +2509,11 @@ var WaveformPlaylist = var _conversions = __webpack_require__(1); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); - var _TimeScaleHook = __webpack_require__(31); + var _TimeScaleHook = __webpack_require__(29); var _TimeScaleHook2 = _interopRequireDefault(_TimeScaleHook); @@ -2691,7 +2680,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 27 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -2702,41 +2691,41 @@ var WaveformPlaylist = value: true }); - var _lodash = __webpack_require__(18); + var _lodash = __webpack_require__(16); var _lodash2 = _interopRequireDefault(_lodash); - var _lodash3 = __webpack_require__(70); + var _lodash3 = __webpack_require__(61); var _lodash4 = _interopRequireDefault(_lodash3); - var _uuid = __webpack_require__(74); + var _uuid = __webpack_require__(65); var _uuid2 = _interopRequireDefault(_uuid); - var _h = __webpack_require__(11); + var _h = __webpack_require__(10); var _h2 = _interopRequireDefault(_h); var _conversions = __webpack_require__(1); - var _webaudioPeaks = __webpack_require__(92); + var _webaudioPeaks = __webpack_require__(81); var _webaudioPeaks2 = _interopRequireDefault(_webaudioPeaks); - var _states = __webpack_require__(35); + var _states = __webpack_require__(33); var _states2 = _interopRequireDefault(_states); - var _CanvasHook = __webpack_require__(28); + var _CanvasHook = __webpack_require__(26); var _CanvasHook2 = _interopRequireDefault(_CanvasHook); - var _FadeCanvasHook = __webpack_require__(29); + var _FadeCanvasHook = __webpack_require__(27); var _FadeCanvasHook2 = _interopRequireDefault(_FadeCanvasHook); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3088,7 +3077,7 @@ var WaveformPlaylist = var stateEvents = state.getEvents(); Object.keys(stateEvents).map(function (event) { - config['ev-' + event] = stateEvents[event].bind(state); + config['on' + event] = stateEvents[event].bind(state); }); stateClass = state.getClasses(); @@ -3109,9 +3098,9 @@ var WaveformPlaylist = return (0, _h2.default)("div.controls", { attributes: { "style": 'height: ' + numChan * data.height + 'px; width: ' + data.controls.width + 'px; position: absolute; left: 0; z-index: 10;' - } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "ev-click": function evClick() { + } }, [(0, _h2.default)("header", [this.name]), (0, _h2.default)("div.btn-group", [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { "onclick": function onclick() { _this3.ee.emit("mute", _this3); - } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "ev-click": function evClick() { + } }, ["Mute"]), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { "onclick": function onclick() { _this3.ee.emit("solo", _this3); } }, ["Solo"])]), (0, _h2.default)("label", [(0, _h2.default)("input.volume-slider", { attributes: { @@ -3120,7 +3109,7 @@ var WaveformPlaylist = "max": 100, "value": 100 }, - "ev-input": function evInput(e) { + "oninput": function oninput(e) { _this3.ee.emit("volumechange", e.target.value, _this3); } })])]); @@ -3281,7 +3270,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 28 */ +/* 26 */ /***/ function(module, exports) { 'use strict'; @@ -3351,7 +3340,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 29 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3362,9 +3351,9 @@ var WaveformPlaylist = value: true }); - var _fadeMaker = __webpack_require__(9); + var _fadeMaker = __webpack_require__(8); - var _fadeCurves = __webpack_require__(16); + var _fadeCurves = __webpack_require__(14); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3445,7 +3434,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 30 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3486,7 +3475,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 31 */ +/* 29 */ /***/ function(module, exports) { 'use strict'; @@ -3543,7 +3532,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 32 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3556,7 +3545,7 @@ var WaveformPlaylist = value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3620,7 +3609,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 33 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3631,11 +3620,11 @@ var WaveformPlaylist = value: true }); - var _BlobLoader = __webpack_require__(32); + var _BlobLoader = __webpack_require__(30); var _BlobLoader2 = _interopRequireDefault(_BlobLoader); - var _XHRLoader = __webpack_require__(34); + var _XHRLoader = __webpack_require__(32); var _XHRLoader2 = _interopRequireDefault(_XHRLoader); @@ -3667,7 +3656,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 34 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3680,7 +3669,7 @@ var WaveformPlaylist = value: true }); - var _Loader2 = __webpack_require__(13); + var _Loader2 = __webpack_require__(12); var _Loader3 = _interopRequireDefault(_Loader2); @@ -3742,7 +3731,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 35 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3751,23 +3740,23 @@ var WaveformPlaylist = value: true }); - var _CursorState = __webpack_require__(36); + var _CursorState = __webpack_require__(34); var _CursorState2 = _interopRequireDefault(_CursorState); - var _SelectState = __webpack_require__(39); + var _SelectState = __webpack_require__(37); var _SelectState2 = _interopRequireDefault(_SelectState); - var _ShiftState = __webpack_require__(40); + var _ShiftState = __webpack_require__(38); var _ShiftState2 = _interopRequireDefault(_ShiftState); - var _FadeInState = __webpack_require__(37); + var _FadeInState = __webpack_require__(35); var _FadeInState2 = _interopRequireDefault(_FadeInState); - var _FadeOutState = __webpack_require__(38); + var _FadeOutState = __webpack_require__(36); var _FadeOutState2 = _interopRequireDefault(_FadeOutState); @@ -3782,7 +3771,7 @@ var WaveformPlaylist = }; /***/ }, -/* 36 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3836,7 +3825,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 37 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3890,7 +3879,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 38 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -3944,7 +3933,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 39 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4027,7 +4016,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 40 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -4102,7 +4091,7 @@ var WaveformPlaylist = exports.default = _class; /***/ }, -/* 41 */ +/* 39 */ /***/ function(module, exports) { /*! @@ -4214,131 +4203,15 @@ var WaveformPlaylist = /***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * cuid.js - * Collision-resistant UID generator for browsers and node. - * Sequential for fast db lookups and recency sorting. - * Safe for element IDs and server-side lookups. - * - * Extracted from CLCTR - * - * Copyright (c) Eric Elliott 2012 - * MIT License - */ - - /*global window, navigator, document, require, process, module */ - (function (app) { - 'use strict'; - var namespace = 'cuid', - c = 0, - blockSize = 4, - base = 36, - discreteValues = Math.pow(base, blockSize), - - pad = function pad(num, size) { - var s = "000000000" + num; - return s.substr(s.length-size); - }, - - randomBlock = function randomBlock() { - return pad((Math.random() * - discreteValues << 0) - .toString(base), blockSize); - }, - - safeCounter = function () { - c = (c < discreteValues) ? c : 0; - c++; // this is not subliminal - return c - 1; - }, - - api = function cuid() { - // Starting with a lowercase letter makes - // it HTML element ID friendly. - var letter = 'c', // hard-coded allows for sequential access - - // timestamp - // warning: this exposes the exact date and time - // that the uid was created. - timestamp = (new Date().getTime()).toString(base), - - // Prevent same-machine collisions. - counter, - - // A few chars to generate distinct ids for different - // clients (so different computers are far less - // likely to generate the same id) - fingerprint = api.fingerprint(), - - // Grab some more chars from Math.random() - random = randomBlock() + randomBlock(); - - counter = pad(safeCounter().toString(base), blockSize); - - return (letter + timestamp + counter + fingerprint + random); - }; - - api.slug = function slug() { - var date = new Date().getTime().toString(36), - counter, - print = api.fingerprint().slice(0,1) + - api.fingerprint().slice(-1), - random = randomBlock().slice(-2); - - counter = safeCounter().toString(36).slice(-4); - - return date.slice(-2) + - counter + print + random; - }; - - api.globalCount = function globalCount() { - // We want to cache the results of this - var cache = (function calc() { - var i, - count = 0; - - for (i in window) { - count++; - } - - return count; - }()); - - api.globalCount = function () { return cache; }; - return cache; - }; - - api.fingerprint = function browserPrint() { - return pad((navigator.mimeTypes.length + - navigator.userAgent.length).toString(36) + - api.globalCount().toString(36), 4); - }; - - // don't change anything from here down. - if (app.register) { - app.register(namespace, api); - } else if (true) { - module.exports = api; - } else { - app[namespace] = api; - } - - }(this.applitude || this)); - - -/***/ }, -/* 43 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var assign = __webpack_require__(50) - , normalizeOpts = __webpack_require__(57) - , isCallable = __webpack_require__(53) - , contains = __webpack_require__(60) + var assign = __webpack_require__(41) + , normalizeOpts = __webpack_require__(48) + , isCallable = __webpack_require__(44) + , contains = __webpack_require__(51) , d; @@ -4399,435 +4272,18 @@ var WaveformPlaylist = /***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = addEvent - - function addEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - events[type] = handler - } else if (Array.isArray(event)) { - if (event.indexOf(handler) === -1) { - event.push(handler) - } - } else if (event !== handler) { - events[type] = [event, handler] - } - } - - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - var globalDocument = __webpack_require__(14) - var EvStore = __webpack_require__(5) - var createStore = __webpack_require__(90) - - var addEvent = __webpack_require__(44) - var removeEvent = __webpack_require__(49) - var ProxyEvent = __webpack_require__(48) - - var HANDLER_STORE = createStore() - - module.exports = DOMDelegator - - function DOMDelegator(document) { - if (!(this instanceof DOMDelegator)) { - return new DOMDelegator(document); - } - - document = document || globalDocument - - this.target = document.documentElement - this.events = {} - this.rawEventListeners = {} - this.globalListeners = {} - } - - DOMDelegator.prototype.addEventListener = addEvent - DOMDelegator.prototype.removeEventListener = removeEvent - - DOMDelegator.allocateHandle = - function allocateHandle(func) { - var handle = new Handle() - - HANDLER_STORE(handle).func = func; - - return handle - } - - DOMDelegator.transformHandle = - function transformHandle(handle, broadcast) { - var func = HANDLER_STORE(handle).func - - return this.allocateHandle(function (ev) { - broadcast(ev, func); - }) - } - - DOMDelegator.prototype.addGlobalEventListener = - function addGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - if (listeners.indexOf(fn) === -1) { - listeners.push(fn) - } - - this.globalListeners[eventName] = listeners; - } - - DOMDelegator.prototype.removeGlobalEventListener = - function removeGlobalEventListener(eventName, fn) { - var listeners = this.globalListeners[eventName] || []; - - var index = listeners.indexOf(fn) - if (index !== -1) { - listeners.splice(index, 1) - } - } - - DOMDelegator.prototype.listenTo = function listenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - this.events[eventName]++; - - if (this.events[eventName] !== 1) { - return - } - - var listener = this.rawEventListeners[eventName] - if (!listener) { - listener = this.rawEventListeners[eventName] = - createHandler(eventName, this) - } - - this.target.addEventListener(eventName, listener, true) - } - - DOMDelegator.prototype.unlistenTo = function unlistenTo(eventName) { - if (!(eventName in this.events)) { - this.events[eventName] = 0; - } - - if (this.events[eventName] === 0) { - throw new Error("already unlistened to event."); - } - - this.events[eventName]--; - - if (this.events[eventName] !== 0) { - return - } - - var listener = this.rawEventListeners[eventName] - - if (!listener) { - throw new Error("dom-delegator#unlistenTo: cannot " + - "unlisten to " + eventName) - } - - this.target.removeEventListener(eventName, listener, true) - } - - function createHandler(eventName, delegator) { - var globalListeners = delegator.globalListeners; - var delegatorTarget = delegator.target; - - return handler - - function handler(ev) { - var globalHandlers = globalListeners[eventName] || [] - - if (globalHandlers.length > 0) { - var globalEvent = new ProxyEvent(ev); - globalEvent.currentTarget = delegatorTarget; - callListeners(globalHandlers, globalEvent) - } - - findAndInvokeListeners(ev.target, ev, eventName) - } - } - - function findAndInvokeListeners(elem, ev, eventName) { - var listener = getListener(elem, eventName) - - if (listener && listener.handlers.length > 0) { - var listenerEvent = new ProxyEvent(ev); - listenerEvent.currentTarget = listener.currentTarget - callListeners(listener.handlers, listenerEvent) - - if (listenerEvent._bubbles) { - var nextTarget = listener.currentTarget.parentNode - findAndInvokeListeners(nextTarget, ev, eventName) - } - } - } - - function getListener(target, type) { - // terminate recursion if parent is `null` - if (target === null || typeof target === "undefined") { - return null - } - - var events = EvStore(target) - // fetch list of handler fns for this event - var handler = events[type] - var allHandler = events.event - - if (!handler && !allHandler) { - return getListener(target.parentNode, type) - } - - var handlers = [].concat(handler || [], allHandler || []) - return new Listener(target, handlers) - } - - function callListeners(handlers, ev) { - handlers.forEach(function (handler) { - if (typeof handler === "function") { - handler(ev) - } else if (typeof handler.handleEvent === "function") { - handler.handleEvent(ev) - } else if (handler.type === "dom-delegator-handle") { - HANDLER_STORE(handler).func(ev) - } else { - throw new Error("dom-delegator: unknown handler " + - "found: " + JSON.stringify(handlers)); - } - }) - } - - function Listener(target, handlers) { - this.currentTarget = target - this.handlers = handlers - } - - function Handle() { - this.type = "dom-delegator-handle" - } - - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - var Individual = __webpack_require__(47) - var cuid = __webpack_require__(42) - var globalDocument = __webpack_require__(14) - - var DOMDelegator = __webpack_require__(45) - - var versionKey = "13" - var cacheKey = "__DOM_DELEGATOR_CACHE@" + versionKey - var cacheTokenKey = "__DOM_DELEGATOR_CACHE_TOKEN@" + versionKey - var delegatorCache = Individual(cacheKey, { - delegators: {} - }) - var commonEvents = [ - "blur", "change", "click", "contextmenu", "dblclick", - "error","focus", "focusin", "focusout", "input", "keydown", - "keypress", "keyup", "load", "mousedown", "mouseup", - "resize", "select", "submit", "touchcancel", - "touchend", "touchstart", "unload" - ] - - /* Delegator is a thin wrapper around a singleton `DOMDelegator` - instance. - - Only one DOMDelegator should exist because we do not want - duplicate event listeners bound to the DOM. - - `Delegator` will also `listenTo()` all events unless - every caller opts out of it - */ - module.exports = Delegator - - function Delegator(opts) { - opts = opts || {} - var document = opts.document || globalDocument - - var cacheKey = document[cacheTokenKey] - - if (!cacheKey) { - cacheKey = - document[cacheTokenKey] = cuid() - } - - var delegator = delegatorCache.delegators[cacheKey] - - if (!delegator) { - delegator = delegatorCache.delegators[cacheKey] = - new DOMDelegator(document) - } - - if (opts.defaultEvents !== false) { - for (var i = 0; i < commonEvents.length; i++) { - delegator.listenTo(commonEvents[i]) - } - } - - return delegator - } - - Delegator.allocateHandle = DOMDelegator.allocateHandle; - Delegator.transformHandle = DOMDelegator.transformHandle; - - -/***/ }, -/* 47 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {var root = typeof window !== 'undefined' ? - window : typeof global !== 'undefined' ? - global : {}; - - module.exports = Individual - - function Individual(key, value) { - if (root[key]) { - return root[key] - } - - Object.defineProperty(root, key, { - value: value - , configurable: true - }) - - return value - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - var inherits = __webpack_require__(65) - - var ALL_PROPS = [ - "altKey", "bubbles", "cancelable", "ctrlKey", - "eventPhase", "metaKey", "relatedTarget", "shiftKey", - "target", "timeStamp", "type", "view", "which" - ] - var KEY_PROPS = ["char", "charCode", "key", "keyCode"] - var MOUSE_PROPS = [ - "button", "buttons", "clientX", "clientY", "layerX", - "layerY", "offsetX", "offsetY", "pageX", "pageY", - "screenX", "screenY", "toElement" - ] - - var rkeyEvent = /^key|input/ - var rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/ - - module.exports = ProxyEvent - - function ProxyEvent(ev) { - if (!(this instanceof ProxyEvent)) { - return new ProxyEvent(ev) - } - - if (rkeyEvent.test(ev.type)) { - return new KeyEvent(ev) - } else if (rmouseEvent.test(ev.type)) { - return new MouseEvent(ev) - } - - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - this._rawEvent = ev - this._bubbles = false; - } - - ProxyEvent.prototype.preventDefault = function () { - this._rawEvent.preventDefault() - } - - ProxyEvent.prototype.startPropagation = function () { - this._bubbles = true; - } - - function MouseEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < MOUSE_PROPS.length; j++) { - var mousePropKey = MOUSE_PROPS[j] - this[mousePropKey] = ev[mousePropKey] - } - - this._rawEvent = ev - } - - inherits(MouseEvent, ProxyEvent) - - function KeyEvent(ev) { - for (var i = 0; i < ALL_PROPS.length; i++) { - var propKey = ALL_PROPS[i] - this[propKey] = ev[propKey] - } - - for (var j = 0; j < KEY_PROPS.length; j++) { - var keyPropKey = KEY_PROPS[j] - this[keyPropKey] = ev[keyPropKey] - } - - this._rawEvent = ev - } - - inherits(KeyEvent, ProxyEvent) - - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - var EvStore = __webpack_require__(5) - - module.exports = removeEvent - - function removeEvent(target, type, handler) { - var events = EvStore(target) - var event = events[type] - - if (!event) { - return - } else if (Array.isArray(event)) { - var index = event.indexOf(handler) - if (index !== -1) { - event.splice(index, 1) - } - } else if (event === handler) { - events[type] = null - } - } - - -/***/ }, -/* 50 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(51)() + module.exports = __webpack_require__(42)() ? Object.assign - : __webpack_require__(52); + : __webpack_require__(43); /***/ }, -/* 51 */ +/* 42 */ /***/ function(module, exports) { 'use strict'; @@ -4842,13 +4298,13 @@ var WaveformPlaylist = /***/ }, -/* 52 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keys = __webpack_require__(54) - , value = __webpack_require__(59) + var keys = __webpack_require__(45) + , value = __webpack_require__(50) , max = Math.max; @@ -4870,7 +4326,7 @@ var WaveformPlaylist = /***/ }, -/* 53 */ +/* 44 */ /***/ function(module, exports) { // Deprecated @@ -4881,18 +4337,18 @@ var WaveformPlaylist = /***/ }, -/* 54 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(55)() + module.exports = __webpack_require__(46)() ? Object.keys - : __webpack_require__(56); + : __webpack_require__(47); /***/ }, -/* 55 */ +/* 46 */ /***/ function(module, exports) { 'use strict'; @@ -4906,7 +4362,7 @@ var WaveformPlaylist = /***/ }, -/* 56 */ +/* 47 */ /***/ function(module, exports) { 'use strict'; @@ -4919,7 +4375,7 @@ var WaveformPlaylist = /***/ }, -/* 57 */ +/* 48 */ /***/ function(module, exports) { 'use strict'; @@ -4942,7 +4398,7 @@ var WaveformPlaylist = /***/ }, -/* 58 */ +/* 49 */ /***/ function(module, exports) { 'use strict'; @@ -4954,7 +4410,7 @@ var WaveformPlaylist = /***/ }, -/* 59 */ +/* 50 */ /***/ function(module, exports) { 'use strict'; @@ -4966,18 +4422,18 @@ var WaveformPlaylist = /***/ }, -/* 60 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(61)() + module.exports = __webpack_require__(52)() ? String.prototype.contains - : __webpack_require__(62); + : __webpack_require__(53); /***/ }, -/* 61 */ +/* 52 */ /***/ function(module, exports) { 'use strict'; @@ -4991,7 +4447,7 @@ var WaveformPlaylist = /***/ }, -/* 62 */ +/* 53 */ /***/ function(module, exports) { 'use strict'; @@ -5004,7 +4460,33 @@ var WaveformPlaylist = /***/ }, -/* 63 */ +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var OneVersionConstraint = __webpack_require__(56); + + var MY_VERSION = '7'; + OneVersionConstraint('ev-store', MY_VERSION); + + var hashKey = '__EV_STORE_KEY@' + MY_VERSION; + + module.exports = EvStore; + + function EvStore(elem) { + var hash = elem[hashKey]; + + if (!hash) { + hash = elem[hashKey] = {}; + } + + return hash; + } + + +/***/ }, +/* 55 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {'use strict'; @@ -5030,12 +4512,12 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 64 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Individual = __webpack_require__(63); + var Individual = __webpack_require__(55); module.exports = OneVersion; @@ -5058,36 +4540,7 @@ var WaveformPlaylist = /***/ }, -/* 65 */ -/***/ function(module, exports) { - - if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } - - -/***/ }, -/* 66 */ +/* 57 */ /***/ function(module, exports) { /** @@ -5141,7 +4594,7 @@ var WaveformPlaylist = /***/ }, -/* 67 */ +/* 58 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5587,7 +5040,7 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 68 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5598,8 +5051,8 @@ var WaveformPlaylist = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var keysIn = __webpack_require__(72), - rest = __webpack_require__(10); + var keysIn = __webpack_require__(63), + rest = __webpack_require__(9); /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -5941,7 +5394,7 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 69 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -5952,8 +5405,8 @@ var WaveformPlaylist = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var assignInWith = __webpack_require__(68), - rest = __webpack_require__(10); + var assignInWith = __webpack_require__(59), + rest = __webpack_require__(9); /** * A faster alternative to `Function#apply`, this function invokes `func` @@ -6063,7 +5516,7 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 70 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6074,8 +5527,8 @@ var WaveformPlaylist = * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ - var baseFor = __webpack_require__(66), - keys = __webpack_require__(71); + var baseFor = __webpack_require__(57), + keys = __webpack_require__(62); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. @@ -6153,9 +5606,9 @@ var WaveformPlaylist = /***/ }, -/* 71 */ -67, -/* 72 */ +/* 62 */ +58, +/* 63 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -6607,7 +6060,7 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 73 */ +/* 64 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) { @@ -6645,7 +6098,7 @@ var WaveformPlaylist = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 74 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { // uuid.js @@ -6656,7 +6109,7 @@ var WaveformPlaylist = // Unique ID creation requires a high quality random # generator. We feature // detect to determine the best RNG source, normalizing to a function that // returns 128-bits of randomness, since that's what's usually required - var _rng = __webpack_require__(73); + var _rng = __webpack_require__(64); // Maps for number <-> hex string conversion var _byteToHex = []; @@ -6834,34 +6287,34 @@ var WaveformPlaylist = /***/ }, -/* 75 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { - var createElement = __webpack_require__(21) + var createElement = __webpack_require__(19) module.exports = createElement /***/ }, -/* 76 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { - var diff = __webpack_require__(89) + var diff = __webpack_require__(80) module.exports = diff /***/ }, -/* 77 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { - var patch = __webpack_require__(80) + var patch = __webpack_require__(71) module.exports = patch /***/ }, -/* 78 */ +/* 69 */ /***/ function(module, exports) { // Maps a virtual DOM tree onto a real DOM tree in an efficient manner. @@ -6952,15 +6405,15 @@ var WaveformPlaylist = /***/ }, -/* 79 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { - var applyProperties = __webpack_require__(20) + var applyProperties = __webpack_require__(18) var isWidget = __webpack_require__(2) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) - var updateWidget = __webpack_require__(81) + var updateWidget = __webpack_require__(72) module.exports = applyPatch @@ -7109,15 +6562,15 @@ var WaveformPlaylist = /***/ }, -/* 80 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { - var document = __webpack_require__(19) - var isArray = __webpack_require__(12) + var document = __webpack_require__(17) + var isArray = __webpack_require__(11) - var render = __webpack_require__(21) - var domIndex = __webpack_require__(78) - var patchOp = __webpack_require__(79) + var render = __webpack_require__(19) + var domIndex = __webpack_require__(69) + var patchOp = __webpack_require__(70) module.exports = patch function patch(rootNode, patches, renderOptions) { @@ -7195,7 +6648,7 @@ var WaveformPlaylist = /***/ }, -/* 81 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { var isWidget = __webpack_require__(2) @@ -7216,12 +6669,12 @@ var WaveformPlaylist = /***/ }, -/* 82 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var EvStore = __webpack_require__(5); + var EvStore = __webpack_require__(54); module.exports = EvHook; @@ -7249,7 +6702,7 @@ var WaveformPlaylist = /***/ }, -/* 83 */ +/* 74 */ /***/ function(module, exports) { 'use strict'; @@ -7272,24 +6725,24 @@ var WaveformPlaylist = /***/ }, -/* 84 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var isArray = __webpack_require__(12); + var isArray = __webpack_require__(11); - var VNode = __webpack_require__(86); - var VText = __webpack_require__(87); + var VNode = __webpack_require__(77); + var VText = __webpack_require__(78); var isVNode = __webpack_require__(3); - var isVText = __webpack_require__(8); + var isVText = __webpack_require__(7); var isWidget = __webpack_require__(2); - var isHook = __webpack_require__(7); - var isVThunk = __webpack_require__(6); + var isHook = __webpack_require__(6); + var isVThunk = __webpack_require__(5); - var parseTag = __webpack_require__(85); - var softSetHook = __webpack_require__(83); - var evHook = __webpack_require__(82); + var parseTag = __webpack_require__(76); + var softSetHook = __webpack_require__(74); + var evHook = __webpack_require__(73); module.exports = h; @@ -7415,12 +6868,12 @@ var WaveformPlaylist = /***/ }, -/* 85 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var split = __webpack_require__(41); + var split = __webpack_require__(39); var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/; var notClassId = /^\.|#/; @@ -7475,14 +6928,14 @@ var WaveformPlaylist = /***/ }, -/* 86 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) var isVNode = __webpack_require__(3) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var isVHook = __webpack_require__(7) + var isThunk = __webpack_require__(5) + var isVHook = __webpack_require__(6) module.exports = VirtualNode @@ -7553,7 +7006,7 @@ var WaveformPlaylist = /***/ }, -/* 87 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { var version = __webpack_require__(4) @@ -7569,11 +7022,11 @@ var WaveformPlaylist = /***/ }, -/* 88 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17) - var isHook = __webpack_require__(7) + var isObject = __webpack_require__(15) + var isHook = __webpack_require__(6) module.exports = diffProps @@ -7633,19 +7086,19 @@ var WaveformPlaylist = /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(12) + var isArray = __webpack_require__(11) - var VPatch = __webpack_require__(23) + var VPatch = __webpack_require__(21) var isVNode = __webpack_require__(3) - var isVText = __webpack_require__(8) + var isVText = __webpack_require__(7) var isWidget = __webpack_require__(2) - var isThunk = __webpack_require__(6) - var handleThunk = __webpack_require__(22) + var isThunk = __webpack_require__(5) + var handleThunk = __webpack_require__(20) - var diffProps = __webpack_require__(88) + var diffProps = __webpack_require__(79) module.exports = diff @@ -8066,54 +7519,7 @@ var WaveformPlaylist = /***/ }, -/* 90 */ -/***/ function(module, exports, __webpack_require__) { - - var hiddenStore = __webpack_require__(91); - - module.exports = createStore; - - function createStore() { - var key = {}; - - return function (obj) { - if ((typeof obj !== 'object' || obj === null) && - typeof obj !== 'function' - ) { - throw new Error('Weakmap-shim: Key must be object') - } - - var store = obj.valueOf(key); - return store && store.identity === key ? - store : hiddenStore(obj, key); - }; - } - - -/***/ }, -/* 91 */ -/***/ function(module, exports) { - - module.exports = hiddenStore; - - function hiddenStore(obj, key) { - var store = { identity: key }; - var valueOf = obj.valueOf; - - Object.defineProperty(obj, "valueOf", { - value: function (value) { - return value !== key ? - valueOf.apply(this, arguments) : store; - }, - writable: true - }); - - return store; - } - - -/***/ }, -/* 92 */ +/* 81 */ /***/ function(module, exports) { 'use strict'; @@ -8269,7 +7675,7 @@ var WaveformPlaylist = }; /***/ }, -/* 93 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { module.exports = function() { @@ -8277,34 +7683,10 @@ var WaveformPlaylist = }; /***/ }, -/* 94 */ +/* 83 */ /***/ function(module, exports) { /* (ignored) */ -/***/ }, -/* 95 */ -94, -/* 96 */ -/***/ function(module, exports, __webpack_require__, __webpack_module_template_argument_0__) { - - /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : - typeof window !== 'undefined' ? window : {} - var minDoc = __webpack_require__(__webpack_module_template_argument_0__); - - if (typeof document !== 'undefined') { - module.exports = document; - } else { - var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; - - if (!doccy) { - doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; - } - - module.exports = doccy; - } - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - /***/ } /******/ ]))); \ No newline at end of file diff --git a/dist/js/waveform-playlist.var.min.js b/dist/js/waveform-playlist.var.min.js index a87eb5e2..32601ff8 100644 --- a/dist/js/waveform-playlist.var.min.js +++ b/dist/js/waveform-playlist.var.min.js @@ -1,8 +1,8 @@ -var WaveformPlaylist=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?(0,h["default"])():arguments[1],r=arguments.length<=2||void 0===arguments[2]?(0,l["default"])():arguments[2];if(void 0===e.container)throw new Error("DOM element container must be given.");var i=new(window.AudioContext||window.webkitAudioContext),o={jsLocation:"js/",ac:i,sampleRate:i.sampleRate,samplesPerPixel:4096,mono:!0,fadeType:"logarithmic",timescale:!1,controls:{show:!1,width:150},colors:{waveOutlineColor:"white",timeColor:"grey",fadeColor:"black"},waveHeight:128,state:"cursor",zoomLevels:[512,1024,2048,4096]},s=(0,a["default"])(o,e),c=s.zoomLevels.indexOf(s.samplesPerPixel);if(-1===c)throw new Error("initial samplesPerPixel must be included in array zoomLevels");var f=new p["default"];f.setSampleRate(s.sampleRate),f.setSamplesPerPixel(s.samplesPerPixel),f.setAudioContext(s.ac),f.setEventEmitter(t),f.setUpEventEmitter(),f.setTimeSelection(0,0),f.setState(s.state),f.setControlOptions(s.controls),f.setWaveHeight(s.waveHeight),f.setColors(s.colors),f.setZoomLevels(s.zoomLevels),f.setZoomIndex(c),f.setMono(s.mono);var d=f.render(),v=(0,u["default"])(d);return s.container.appendChild(v),f.tree=d,f.rootNode=v,r.listenTo("scroll"),n.p=s.jsLocation,f}Object.defineProperty(t,"__esModule",{value:!0}),t.init=i;var o=n(18),a=r(o),s=n(75),u=r(s),c=n(46),l=r(c),f=n(15),h=r(f),d=n(24),p=r(d)},function(e,t){"use strict";function n(e,t){return e/t}function r(e,t){return Math.ceil(e*t)}function i(e,t){return~~(e/t)}function o(e,t){return~~(e*t)}function a(e,t,n){return e*t/n}function s(e,t,n){return Math.ceil(e*n/t)}Object.defineProperty(t,"__esModule",{value:!0}),t.samplesToSeconds=n,t.secondsToSamples=r,t.samplesToPixels=i,t.pixelsToSamples=o,t.pixelsToSeconds=a,t.secondsToPixels=s},function(e,t){function n(e){return e&&"Widget"===e.type}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualNode"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t){e.exports="2"},function(e,t,n){"use strict";function r(e){var t=e[a];return t||(t=e[a]={}),t}var i=n(64),o="7";i("ev-store",o);var a="__EV_STORE_KEY@"+o;e.exports=r},function(e,t){function n(e){return e&&"Thunk"===e.type}e.exports=n},function(e,t){function n(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}e.exports=n},function(e,t,n){function r(e){return e&&"VirtualText"===e.type&&e.version===i}var i=n(4);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=(0,d.sCurve)(1e4,1);this.setValueCurveAtTime(n,e,t)}function i(e,t){var n=(0,d.sCurve)(1e4,-1);this.setValueCurveAtTime(n,e,t)}function o(e,t){this.linearRampToValueAtTime(0,e),this.linearRampToValueAtTime(1,e+t)}function a(e,t){this.linearRampToValueAtTime(1,e),this.linearRampToValueAtTime(0,e+t)}function s(e,t){this.exponentialRampToValueAtTime(.01,e),this.exponentialRampToValueAtTime(1,e+t)}function u(e,t){this.exponentialRampToValueAtTime(1,e),this.exponentialRampToValueAtTime(.01,e+t)}function c(e,t){var n=(0,d.logarithmic)(1e4,10,1);this.setValueCurveAtTime(n,e,t)}function l(e,t){var n=(0,d.logarithmic)(1e4,10,-1);this.setValueCurveAtTime(n,e,t)}function f(e,t,n,i){switch(t){case p:r.call(e,n,i);break;case v:o.call(e,n,i);break;case m:s.call(e,n,i);break;case y:c.call(e,n,i);break;default:throw new Error("Unsupported Fade type")}}function h(e,t,n,r){switch(t){case p:i.call(e,n,r);break;case v:a.call(e,n,r);break;case m:u.call(e,n,r);break;case y:l.call(e,n,r);break;default:throw new Error("Unsupported Fade type")}}Object.defineProperty(t,"__esModule",{value:!0}),t.FADEOUT=t.FADEIN=t.LOGARITHMIC=t.EXPONENTIAL=t.LINEAR=t.SCURVE=void 0,t.createFadeIn=f,t.createFadeOut=h;var d=n(16),p=t.SCURVE="sCurve",v=t.LINEAR="linear",m=t.EXPONENTIAL="exponential",y=t.LOGARITHMIC="logarithmic";t.FADEIN="FadeIn",t.FADEOUT="FadeOut"},function(e,t){(function(t){function n(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function r(e,t){if("function"!=typeof e)throw new TypeError(u);return t=w(void 0===t?e.length-1:a(t),0),function(){for(var r=arguments,i=-1,o=w(r.length-t,0),a=Array(o);++ie?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,b=t.Object.prototype,k=b.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(84);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;n>t;++t)o[t-1]=arguments[t];h.call(i,this,o)}},s={on:r,once:i,off:o,emit:a},u={on:l(r),once:l(i),off:l(o),emit:l(a)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,o=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,i=t>0?n:e-1-n,o[i]=Math.exp(2*r-1)/Math.exp(1);return o}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function o(e,t,n){var r,i,o=new Float32Array(e),a=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,a=i/e,o[r]=Math.log(1+t*a)/Math.log(1+t);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=o},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!x.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&c(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(67),m=n(10),y=9007199254740991,g="[object Function]",b="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,x=w.hasOwnProperty,P=w.toString,T=o("length"),O=u(function(e,t){a(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},[96,95],function(e,t,n){function r(e,t,n){for(var r in t){var a=t[r];void 0===a?i(e,r,a,n):u(a)?(i(e,r,a,n),a.hook&&a.hook(e,r,n?n[r]:void 0)):s(a)?o(e,t,n,r,a):e[r]=a}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var o in i)e.removeAttribute(o);else if("style"===t)for(var a in i)e.style[a]="";else"string"==typeof i?e[t]="":e[t]=null}}function o(e,t,n,r,i){var o=n?n[r]:void 0;if("attributes"!==r){if(o&&s(o)&&a(o)!==a(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function a(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(17),u=n(7);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!a(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;o(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,void 0))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),o=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.tracks.forEach(function(i){i.setState("cursor"),o.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=o,this.startAnimation(e),Promise.all(this.playoutPromises)}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},"ev-scroll":function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,a.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,a.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},o=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(o.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[o,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var o=n>e?n:e,a=t>r?r:t;this.setCues(o+i,a+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(P.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(P.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,o,a,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,o=Math.min(f,this.duration)):o=this.duration):(i=t-this.startTime,o=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,a=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(at.start&&a1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),o=n.getEvents();Object.keys(o).map(function(e){r["ev-"+e]=o[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{"ev-click":function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{"ev-click":function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},"ev-input":function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),o=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),a=0,s=this.peaks.data.length;r>0&&r>i&&(a=o>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var o=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+a+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);o.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new k["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new x["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);o.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new x["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},o)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var o=Math.abs(r*t),a=Math.abs(i*t);e.fillRect(n,0,1,t-a),e.fillRect(n,t+o,1,t-o)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(a,s,i,c,l)}}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function o(e,t,n,r,o){var a=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",a=i(t,n,r),c=o-a[0]*o,e.beginPath(),e.moveTo(0,c),s=1,u=a.length;u>s;s++)c=o-a[s]*o,e.lineTo(s,c);e.stroke()}var a=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&ne?-1:1;return t*l}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(a(e)){var t=i(e.valueOf)?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=m.test(e);return n||y.test(e)?g(e.slice(2),n?2:8):v.test(e)?f:+e}var u="Expected a function",c=1/0,l=1.7976931348623157e308,f=NaN,h="[object Function]",d="[object GeneratorFunction]",p=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,g=parseInt,k=t.Object.prototype,b=k.toString,w=Math.max;e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r=n(75);e.exports=r},function(e,t){function n(e){return"[object Array]"===i.call(e)}var r=Array.isArray,i=Object.prototype.toString;e.exports=r||n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt;++t)a[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)h.call(r,this,a)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,a=new Array(n-1),t=1;n>t;++t)a[t-1]=arguments[t];h.call(i,this,a)}},s={on:r,once:i,off:a,emit:o},u={on:l(r),once:l(i),off:l(a),emit:l(o)},c=m({},u),e.exports=t=function(e){return null==e?p(c):m(Object(e),u)},t.methods=s},function(e,t){"use strict";function n(e,t){var n,r,i=new Float32Array(e),a=e-1;for(n=0;e>n;n++)r=n/a,t>0?i[n]=r:i[n]=1-r;return i}function r(e,t){var n,r,i,a=new Float32Array(e),o=e-1;for(n=0;e>n;n++)r=n/o,i=t>0?n:e-1-n,a[i]=Math.exp(2*r-1)/Math.exp(1);return a}function i(e,t){var n,r=new Float32Array(e),i=t>0?Math.PI/2:-(Math.PI/2);for(n=0;e>n;++n)r[n]=Math.sin(Math.PI*n/e-i)/2+.5;return r}function a(e,t,n){var r,i,a=new Float32Array(e),o=0;for(i=0;e>i;i++)r=n>0?i:e-1-i,o=i/e,a[r]=Math.log(1+t*o)/Math.log(1+t);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.linear=n,t.exponential=r,t.sCurve=i,t.logarithmic=a},function(e,t){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!l(r,n)||l(r,w[t])&&!P.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n){return s(e,t,n)}function s(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&c(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&y>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var v=n(58),m=n(9),y=9007199254740991,g="[object Function]",k="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,w=t.Object.prototype,P=w.hasOwnProperty,x=w.toString,T=a("length"),O=u(function(e,t){o(t,v(t),e)});e.exports=O}).call(t,function(){return this}())},function(e,t,n){(function(t){var r="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},i=n(83);if("undefined"!=typeof document)e.exports=document;else{var a=r["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),e.exports=a}}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){for(var r in t){var o=t[r];void 0===o?i(e,r,o,n):u(o)?(i(e,r,o,n),o.hook&&o.hook(e,r,n?n[r]:void 0)):s(o)?a(e,t,n,r,o):e[r]=o}}function i(e,t,n,r){if(r){var i=r[t];if(u(i))i.unhook&&i.unhook(e,t,n);else if("attributes"===t)for(var a in i)e.removeAttribute(a);else if("style"===t)for(var o in i)e.style[o]="";else"string"==typeof i?e[t]="":e[t]=null}}function a(e,t,n,r,i){var a=n?n[r]:void 0;if("attributes"!==r){if(a&&s(a)&&o(a)!==o(i))return void(e[r]=i);s(e[r])||(e[r]={});var u="style"===r?"":void 0;for(var c in i){var l=i[c];e[r][c]=void 0===l?u:l}}else for(var f in i){var h=i[f];void 0===h?e.removeAttribute(f):e.setAttribute(f,h)}}function o(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var s=n(15),u=n(6);e.exports=r},function(e,t,n){function r(e,t){var n=t?t.document||i:i,l=t?t.warn:null;if(e=c(e).a,u(e))return e.init();if(s(e))return n.createTextNode(e.text);if(!o(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?n.createElement(e.tagName):n.createElementNS(e.namespace,e.tagName),h=e.properties;a(f,h);for(var d=e.children,p=0;p-1?t.splice(n,1):t.push(e)}},{key:"soloTrack",value:function(e){var t=this.soloedTracks,n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e)}},{key:"adjustTrackPlayout",value:function(){var e,t=this;this.tracks.forEach(function(n){e=t.shouldTrackPlay(n)?1:0,n.setMasterGainLevel(e)})}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce(function(e,t){return Math.max(e,t.getEndTime())},0)}},{key:"shouldTrackPlay",value:function(e){var t;return this.soloedTracks.length>0?(t=!1,this.soloedTracks.indexOf(e)>-1&&(t=!0)):(t=!0,this.mutedTracks.indexOf(e)>-1&&(t=!1)),t}},{key:"isPlaying",value:function(){return this.tracks.reduce(function(e,t){return e||t.isPlaying()},!1)}},{key:"getCurrentTime",value:function(){var e=this.lastSeeked||this.pausedAt||this.cursor;return e+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"restartPlayFrom",value:function(e,t){return this.stopAnimation(),this.tracks.forEach(function(e){e.scheduleStop()}),Promise.all(this.playoutPromises).then(this.play.bind(this,e,t))}},{key:"play",value:function(e,t){var n=this,r=this.ac.currentTime,i=this.getTimeSelection(),a=[];return e=e||this.pausedAt||this.cursor,!t&&i.end!==i.start&&i.end>e&&(t=i.end),this.isPlaying()?void this.restartPlayFrom(e,t):(this.tracks.forEach(function(i){i.setState("cursor"),a.push(i.schedulePlay(r,e,t,{masterGain:n.shouldTrackPlay(i)?1:0}))}),this.lastPlay=r,this.playoutPromises=a,this.startAnimation(e),Promise.all(this.playoutPromises))}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):void 0}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var e=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach(function(t){t.scheduleStop(),t.setState(e.getState())}),this.draw(this.render()),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var e=this;return this.stop().then(function(){e.scrollLeft=0,e.ee.emit("select",0,0)})}},{key:"fastForward",value:function(){var e=this;return this.stop().then(function(){e.viewDuration-1,muted:e.mutedTracks.indexOf(t)>-1}))});return(0,c["default"])("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},[n.render(),(0,c["default"])("div.playlist-tracks",{attributes:{style:"overflow: auto;"},onscroll:function(t){e.scrollLeft=(0,p.pixelsToSeconds)(t.target.scrollLeft,e.samplesPerPixel,e.sampleRate),e.ee.emit("scroll",e.scrollLeft)},hook:new g["default"](this,this.samplesPerPixel,this.sampleRate)},i)])}},{key:"getInfo",value:function(){var e=[];return this.tracks.forEach(function(t){e.push(t.getTrackDetails())}),e}}]),e}();t["default"]=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nn;n++)if(e<=t[n])return this.timeinfo[t[n]]}},{key:"formatTime",value:function(e){var t,n,r,i;return i=e/1e3,r=i%60,n=(i-r)/60,10>r&&(r="0"+r),t=n+":"+r}},{key:"render",value:function(){var e=(0,o.secondsToPixels)(this.duration,this.samplesPerPixel,this.sampleRate),t=this.sampleRate/this.samplesPerPixel,n=(0,o.secondsToPixels)(this.offset,this.samplesPerPixel,this.sampleRate),r=this.getScaleInfo(this.samplesPerPixel),i={},a=[],s=void 0,c=e+n,f=void 0,h=void 0,d=0;for(s=0;c>s;s+=t*r.secondStep)f=~~s,h=f-n,f>=n&&(r.marker&&d%r.marker===0?(a.push((0,u["default"])("div.time",{attributes:{style:"position: absolute; left: "+h+"px;"}},[this.formatTime(d)])),i[h]=10):r.bigStep&&d%r.bigStep===0?i[h]=5:r.smallStep&&d%r.smallStep===0&&(i[h]=2)),d+=1e3*r.secondStep;return(0,u["default"])("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: "+this.marginLeft+"px;"}},[a,(0,u["default"])("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new l["default"](i,this.offset,this.samplesPerPixel,this.duration)})])}}]),e}();t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nt)throw new Error("cue out cannot be less than cue in");this.cueIn=e,this.cueOut=t,this.duration=this.cueOut-this.cueIn,this.endTime=this.startTime+this.duration}},{key:"trim",value:function(e,t){var n=this.getStartTime(),r=this.getEndTime(),i=this.cueIn-n;if(e>=n&&r>=e||t>=n&&r>=t){var a=n>e?n:e,o=t>r?r:t;this.setCues(a+i,o+i),e>n&&this.setStartTime(e)}}},{key:"setStartTime",value:function(e){this.startTime=e,this.endTime=e+this.duration}},{key:"setPlayout",value:function(e){this.playout=e}},{key:"setEnabledStates",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=(0,s["default"])(t,e)}},{key:"setFadeIn",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade In");var n={shape:t,start:0,end:e};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(x.FADEIN,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?"logarithmic":arguments[1];if(e>this.duration)throw new Error("Invalid Fade Out");var n={shape:t,start:this.duration-e,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(x.FADEOUT,n.shape,n.start,n.end)}},{key:"saveFade",value:function(e,t,n,r){var i=f["default"].v4();return this.fades[i]={type:e,shape:t,start:n,end:r},i}},{key:"removeFade",value:function(e){delete this.fades[e]}},{key:"setBuffer",value:function(e){this.buffer=e}},{key:"setPeakData",value:function(e){this.peakData=e}},{key:"calculatePeaks",value:function(e,t){var n=(0,p.secondsToSamples)(this.cueIn,t),r=(0,p.secondsToSamples)(this.cueOut,t);this.setPeaks((0,m["default"])(this.buffer,e,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(e){this.peaks=e}},{key:"setState",value:function(e){this.state=e}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setGainLevel",value:function(e){this.gain=e,this.playout.setGainLevel(e)}},{key:"setMasterGainLevel",value:function(e){this.playout.setMasterGainLevel(e)}},{key:"schedulePlay",value:function(e,t,n,r){var i,a,o,s,u=this,l=e,f=n?n-t:void 0;return this.endTime<=t||f&&t+f=t?(i=0,l=l+this.startTime-t,n?(f-=this.startTime-t,a=Math.min(f,this.duration)):a=this.duration):(i=t-this.startTime,a=n?Math.min(f,this.duration-i):this.duration-i),i+=this.cueIn,o=t-this.startTime,s=this.playout.setUpSource(),(0,c["default"])(this.fades,function(t){var n=void 0,r=void 0;if(ot.start&&o1?"segment":"point";return(0,d["default"])("div.selection."+i,{attributes:{style:"position: absolute; width: "+r+"px; bottom: 0; top: 0; left: "+t+"px; z-index: 4;"}})}},{key:"renderOverlay",value:function(e){var t=this,n=(0,p.secondsToPixels)(e.playlistLength,e.resolution,e.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: "+n+"px; z-index: 9;"}},i="";return this.state&&this.enabledStates[this.state]&&!function(){var n=new g["default"][t.state](t,e.resolution,e.sampleRate),a=n.getEvents();Object.keys(a).map(function(e){r["on"+e]=a[e].bind(n)}),i=n.getClasses()}(),(0,d["default"])("div.playlist-overlay"+i,r)}},{key:"renderControls",value:function(e){var t=this,n=e.muted?".active":"",r=e.soloed?".active":"",i=this.peaks.data.length;return(0,d["default"])("div.controls",{attributes:{style:"height: "+i*e.height+"px; width: "+e.controls.width+"px; position: absolute; left: 0; z-index: 10;"}},[(0,d["default"])("header",[this.name]),(0,d["default"])("div.btn-group",[(0,d["default"])("span.btn.btn-default.btn-xs.btn-mute"+n,{onclick:function(){t.ee.emit("mute",t)}},["Mute"]),(0,d["default"])("span.btn.btn-default.btn-xs.btn-solo"+r,{onclick:function(){t.ee.emit("solo",t)}},["Solo"])]),(0,d["default"])("label",[(0,d["default"])("input.volume-slider",{attributes:{type:"range",min:0,max:100,value:100},oninput:function(e){t.ee.emit("volumechange",e.target.value,t)}})])])}},{key:"render",value:function(e){var t=this,n=this.peaks.length,r=(0,p.secondsToPixels)(e.playbackSeconds,e.resolution,e.sampleRate),i=(0,p.secondsToPixels)(this.startTime,e.resolution,e.sampleRate),a=(0,p.secondsToPixels)(this.endTime,e.resolution,e.sampleRate),o=0,s=this.peaks.data.length;r>0&&r>i&&(o=a>r?r-i:n);var u=[(0,d["default"])("div.cursor",{attributes:{style:"position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: "+r+"px; bottom: 0; z-index: 5;"}})],c=Object.keys(this.peaks.data).map(function(r){for(var a=[(0,d["default"])("div.channel-progress",{attributes:{style:"position: absolute; width: "+o+"px; height: "+e.height+"px; z-index: 2;"}})],s=0,u=n,c=t.peaks.data[r];u>0;){var l=Math.min(u,T);a.push((0,d["default"])("canvas",{attributes:{width:l,height:e.height,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3;"},hook:new b["default"](c,s,t.peaks.bits,e.colors.waveOutlineColor)})),u-=l,s+=T}if(t.fadeIn){var f=t.fades[t.fadeIn],h=(0,p.secondsToPixels)(f.end-f.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+h+"px; top: 0; left: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:h,height:e.height},hook:new P["default"](f.type,f.shape,f.end-f.start,e.resolution)})]))}if(t.fadeOut){var v=t.fades[t.fadeOut],m=(0,p.secondsToPixels)(v.end-v.start,e.resolution,e.sampleRate);a.push((0,d["default"])("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: "+e.height+"px; width: "+m+"px; top: 0; right: 0; z-index: 4;"}},[(0,d["default"])("canvas",{attributes:{width:m,height:e.height},hook:new P["default"](v.type,v.shape,v.end-v.start,e.resolution)})]))}return(0,d["default"])("div.channel.channel-"+r,{attributes:{style:"height: "+e.height+"px; width: "+n+"px; top: "+r*e.height+"px; left: "+i+"px; position: absolute; margin: 0; padding: 0; z-index: 1;"}},a)}),l=e.masterGain?"":".silent";u.push(c),u.push(this.renderOverlay(e)),e.isActive===!0&&u.push(this.renderTimeSelection(e));var f=(0,d["default"])("div.waveform",{attributes:{style:"height: "+s*e.height+"px; position: relative;"}},u),h=[],v=0;return e.controls.show&&(h.push(this.renderControls(e)),v=e.controls.width),h.push(f),(0,d["default"])("div.channel-wrapper"+l,{attributes:{style:"margin-left: "+v+"px; height: "+e.height*s+"px;"}},h)}},{key:"getTrackDetails",value:function(){var e={src:this.src,start:this.startTime,name:this.name,cuein:this.cueIn,cueout:this.cueOut};if(this.fadeIn){var t=this.fades[this.fadeIn];e.fadeIn={shape:t.shape,duration:t.end-t.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];e.fadeOut={shape:n.shape,duration:n.end-n.start}}return e}}]),e}();t["default"]=O},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,r,i){var a=Math.abs(r*t),o=Math.abs(i*t);e.fillRect(n,0,1,t-o),e.fillRect(n,t+a,1,t-a)}var i=function(){function e(e,t){for(var n=0;ni;i++)c=this.peaks[2*(i+this.offset)]/u,l=this.peaks[2*(i+this.offset)+1]/u,r(o,s,i,c,l)}}}]),e}();t["default"]=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=t===s.FADEIN?1:-1,i=void 0;switch(e){case s.SCURVE:i=(0,u.sCurve)(n,r);break;case s.LINEAR:i=(0,u.linear)(n,r);break;case s.EXPONENTIAL:i=(0,u.exponential)(n,r);break;case s.LOGARITHMIC:i=(0,u.logarithmic)(n,10,r);break;default:throw new Error("Unsupported Fade type")}return i}function a(e,t,n,r,a){var o=void 0,s=void 0,u=void 0,c=void 0;for(e.strokeStyle="black",o=i(t,n,r),c=a-o[0]*a,e.beginPath(),e.moveTo(0,c),s=1,u=o.length;u>s;s++)c=a-o[s]*a,e.lineTo(s,c);e.stroke()}var o=function(){function e(e,t){for(var n=0;nthis.track.getStartTime()&&nthis.track.getStartTime()&&n * Available under the MIT License * ECMAScript compliant, uniform cross-browser split method */ -e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(a,function(){for(var t=1;t1&&s.index=o)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>o?l.slice(0,o):l}}()},function(e,t,n){!function(t){"use strict";var n="cuid",r=0,i=4,o=36,a=Math.pow(o,i),s=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},u=function(){return s((Math.random()*a<<0).toString(o),i)},c=function(){return r=a>r?r:0,r++,r-1},l=function(){var e,t="c",n=(new Date).getTime().toString(o),r=l.fingerprint(),a=u()+u();return e=s(c().toString(o),i),t+n+e+r+a};l.slug=function(){var e,t=(new Date).getTime().toString(36),n=l.fingerprint().slice(0,1)+l.fingerprint().slice(-1),r=u().slice(-2);return e=c().toString(36).slice(-4),t.slice(-2)+e+n+r},l.globalCount=function(){var e=function(){var e,t=0;for(e in window)t++;return t}();return l.globalCount=function(){return e},e},l.fingerprint=function(){return s((navigator.mimeTypes.length+navigator.userAgent.length).toString(36)+l.globalCount().toString(36),4)},t.register?t.register(n,l):e.exports=l}(this.applitude||this)},function(e,t,n){"use strict";var r,i=n(50),o=n(57),a=n(53),s=n(60);r=e.exports=function(e,t){var n,r,a,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=a=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),a=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:a},u?i(o(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:a(t)?null==n?n=void 0:a(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(o(c),l):l}},function(e,t,n){function r(e,t,n){var r=i(e),o=r[t];o?Array.isArray(o)?-1===o.indexOf(n)&&o.push(n):o!==n&&(r[t]=[o,n]):r[t]=n}var i=n(5);e.exports=r},function(e,t,n){function r(e){return this instanceof r?(e=e||l,this.target=e.documentElement,this.events={},this.rawEventListeners={},void(this.globalListeners={})):new r(e)}function i(e,t){function n(t){var n=r[e]||[];if(n.length>0){var a=new v(t);a.currentTarget=i,s(n,a)}o(t.target,t,e)}var r=t.globalListeners,i=t.target;return n}function o(e,t,n){var r=a(e,n);if(r&&r.handlers.length>0){var i=new v(t);if(i.currentTarget=r.currentTarget,s(r.handlers,i),i._bubbles){var u=r.currentTarget.parentNode;o(u,t,n)}}}function a(e,t){if(null===e||"undefined"==typeof e)return null;var n=f(e),r=n[t],i=n.event;if(!r&&!i)return a(e.parentNode,t);var o=[].concat(r||[],i||[]);return new u(e,o)}function s(e,t){e.forEach(function(n){if("function"==typeof n)n(t);else if("function"==typeof n.handleEvent)n.handleEvent(t);else{if("dom-delegator-handle"!==n.type)throw new Error("dom-delegator: unknown handler found: "+JSON.stringify(e));m(n).func(t)}})}function u(e,t){this.currentTarget=e,this.handlers=t}function c(){this.type="dom-delegator-handle"}var l=n(14),f=n(5),h=n(90),d=n(44),p=n(49),v=n(48),m=h();e.exports=r,r.prototype.addEventListener=d,r.prototype.removeEventListener=p,r.allocateHandle=function(e){var t=new c;return m(t).func=e,t},r.transformHandle=function(e,t){var n=m(e).func;return this.allocateHandle(function(e){t(e,n)})},r.prototype.addGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[];-1===n.indexOf(t)&&n.push(t),this.globalListeners[e]=n},r.prototype.removeGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[],r=n.indexOf(t);-1!==r&&n.splice(r,1)},r.prototype.listenTo=function(e){if(e in this.events||(this.events[e]=0),this.events[e]++,1===this.events[e]){var t=this.rawEventListeners[e];t||(t=this.rawEventListeners[e]=i(e,this)),this.target.addEventListener(e,t,!0)}},r.prototype.unlistenTo=function(e){if(e in this.events||(this.events[e]=0),0===this.events[e])throw new Error("already unlistened to event.");if(this.events[e]--,0===this.events[e]){var t=this.rawEventListeners[e];if(!t)throw new Error("dom-delegator#unlistenTo: cannot unlisten to "+e);this.target.removeEventListener(e,t,!0)}}},function(e,t,n){function r(e){e=e||{};var t=e.document||a,n=t[l];n||(n=t[l]=o());var r=f.delegators[n];if(r||(r=f.delegators[n]=new s(t)),e.defaultEvents!==!1)for(var i=0;ia;++a)t=arguments[a],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(55)()?Object.keys:n(56)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(61)()?String.prototype.contains:n(62)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,o=r+"_ENFORCE_SINGLETON",a=i(o,t);if(a!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+a+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(63);e.exports=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function o(e){return j(Object(e))}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){var t=u(e);if(!t&&!l(e))return o(e);var n=s(e),a=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||a&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,b="[object Arguments]",k="[object Function]",w="[object GeneratorFunction]",x="[object String]",P=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,A=a("length"),R=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||b.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,k[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t,n,r){n||(n={});for(var o=-1,a=t.length;++o1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&u(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(72),v=n(10),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",b=/^(?:0|[1-9]\d*)$/,k=t.Object.prototype,w=k.hasOwnProperty,x=k.toString,P=o("length"),T=s(function(e,t,n){a(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||o(e,u[n])&&!c.call(r,n)?t:e}function o(e,t){return e===t||e!==e&&t!==t}var a=n(68),s=n(10),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(a,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:a}function o(e,t){return e&&r(e,i(t))}function a(e){return e}var s=n(66),u=n(71);e.exports=o},67,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function o(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function a(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(R(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==b)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(A(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==k||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!R(e)&&v(e)&&E.call(e)==x}function y(e){for(var t=-1,n=u(e),i=o(e),a=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function o(e,t,n){var r=t&&n||0,o=t||[];e=e||{};var a=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(a=a+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=a,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;o[r++]=l>>>24&255,o[r++]=l>>>16&255,o[r++]=l>>>8&255,o[r++]=255&l;var f=s/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var m=e.node||h,y=0;6>y;y++)o[r+y]=m[y];return t?t:i(o)}function a(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;16>a;a++)t[r+a]=o[a];return t||i(o)}for(var s=n(73),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=a;m.v1=o,m.v4=a,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(21);e.exports=r},function(e,t,n){var r=n(89);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(o),r(e,t,n,i,0)):{}}function r(e,t,n,o,s){if(o=o||{},e){i(n,s,s)&&(o[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=o;){if(r=(a+o)/2>>0,i=e[r],o===a)return i>=t&&n>=i;if(t>i)o=r+1;else{if(!(i>n))return!0;a=r-1}}return!1}function o(e,t){return e>t?1:-1}var a={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return o(t,d,n);case p.VTEXT:return a(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function o(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function a(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var o=e.parentNode;i=r.render(n,r),o&&i!==e&&o.replaceChild(i,e)}return i}function s(e,t,n,r){var i,o=v(t,n);i=o?n.update(t,e)||e:r.render(n,r);var a=e.parentNode;return a&&i!==e&&a.replaceChild(i,e),o||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,o=r.render(n,r);return i&&o!==e&&i.replaceChild(o,e),o}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,o=e.childNodes,a={},s=0;s=u++?null:o[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(20),d=n(2),p=n(23),v=n(81);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=a(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;cb;b++){var k=n[b];o(k)?(d+=k.count||0,!p&&k.hasWidgets&&(p=!0),!v&&k.hasThunks&&(v=!0),m||!k.hooks&&!k.descendantHooks||(m=!0)):!p&&a(k)?"function"==typeof k.destroy&&(p=!0):!v&&s(k)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),o=n(3),a=n(2),s=n(6),u=n(7);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(o(u)&&o(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(a(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var o=n(17),a=n(7);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)k(e)||(a(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=P(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=o(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else b(t)?b(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):k(t)&&(k(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&a(e,n,r)}}function o(e,t,n,r,o){for(var a=e.children,s=h(a,t.children),u=s.children,c=a.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=a[d],m=u[d];o+=1,p?i(p,m,n,o):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(o+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function a(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(k(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,s(a,t,n),g(a)&&a.count&&(n+=a.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var o=x(e,t),a=r(o.a,o.b);c(a)&&(n[i]=new y(y.THUNK,null,a))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,o=0;i>o;o++){var a=r[o];n+=1,l(a,t,n),g(a)&&a.count&&(n+=a.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var o=p(e),a=o.keys,s=o.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(b)}for(var k,w=u.slice(),x=0,P=[],T=[],O=0;Oi;i++){var o=e[i];o.key?t[o.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(12),y=n(23),g=n(3),b=n(8),k=n(2),w=n(6),x=n(22),P=n(88);e.exports=r},function(e,t,n){function r(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:i(t,e)}}var i=n(91);e.exports=r},function(e,t){function n(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}e.exports=n},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,o=e.length;o>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,o){if(t=t||1e4,o=o||8,n=n||!0,[8,16,32].indexOf(o)<0)throw new Error("Invalid number of bits specified for peaks.");var a,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(a=0;l>a;a++)u=e.getChannelData(a),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,o));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,o));return n&&f.length>1&&(f=makeMono(f,o)),s=f[0].length/2,{length:s,data:f,bits:o}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){},94,function(e,t,n,r){(function(t){var i="undefined"!=typeof t?t:"undefined"!=typeof window?window:{},o=n(r);if("undefined"!=typeof document)e.exports=document;else{var a=i["__GLOBAL_DOCUMENT_CACHE@4"];a||(a=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=a}}).call(t,function(){return this}())}])); \ No newline at end of file +e.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,a){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,a);var o,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0,i=new RegExp(i.source,f+"g");for(t+="",r||(o=new RegExp("^"+i.source+"$(?!\\s)",f)),a=a===e?-1>>>0:a>>>0;(s=i.exec(t))&&(u=s.index+s[0].length,!(u>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(o,function(){for(var t=1;t1&&s.index=a)));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?(c||!i.test(""))&&l.push(""):l.push(t.slice(h)),l.length>a?l.slice(0,a):l}}()},function(e,t,n){"use strict";var r,i=n(41),a=n(48),o=n(44),s=n(51);r=e.exports=function(e,t){var n,r,o,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=o=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),o=s.call(e,"w")),c={value:t,configurable:n,enumerable:r,writable:o},u?i(a(u),c):c},r.gs=function(e,t,n){var r,u,c,l;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],null==t?t=void 0:o(t)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),l={get:t,set:n,configurable:r,enumerable:u},c?i(a(c),l):l}},function(e,t,n){"use strict";e.exports=n(42)()?Object.assign:n(43)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"!=typeof t?!1:(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(45),i=n(50),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},o=1;u>o;++o)t=arguments[o],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(46)()?Object.keys:n(47)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(52)()?String.prototype.contains:n(53)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";function r(e){var t=e[o];return t||(t=e[o]={}),t}var i=n(56),a="7";i("ev-store",a);var o="__EV_STORE_KEY@"+a;e.exports=r},function(e,t){(function(t){"use strict";function n(e,t){return e in r?r[e]:(r[e]=t,t)}var r="undefined"!=typeof window?window:"undefined"!=typeof t?t:{};e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t,n){var r="__INDIVIDUAL_ONE_VERSION_"+e,a=r+"_ENFORCE_SINGLETON",o=i(a,t);if(o!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+o+" installed.\nThis means you cannot install version "+t);return i(r,n)}var i=n(55);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(n(a[u],u,a)===!1)break}return t}}var r=n();e.exports=r},function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e,t){return O.call(e,t)||"object"==typeof e&&t in e&&null===S(e)}function a(e){return j(Object(e))}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!_.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){var t=u(e);if(!t&&!l(e))return a(e);var n=s(e),o=!!n,c=n||[],f=c.length;for(var h in e)!i(e,h)||o&&("length"==h||r(h,f))||t&&"constructor"==h||c.push(h);return c}var g=9007199254740991,k="[object Arguments]",b="[object Function]",w="[object GeneratorFunction]",P="[object String]",x=/^(?:0|[1-9]\d*)$/,T=t.Object.prototype,O=T.hasOwnProperty,E=T.toString,S=Object.getPrototypeOf,_=T.propertyIsEnumerable,j=Object.keys,R=o("length"),A=Array.isArray;e.exports=y}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t){return e="number"==typeof e||k.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function i(e,t,n){var r=e[t];(!c(r,n)||c(r,b[t])&&!w.call(e,t)||void 0===n&&!(t in e))&&(e[t]=n)}function a(e){return function(t){return null==t?void 0:t[e]}}function o(e,t,n,r){n||(n={});for(var a=-1,o=t.length;++a1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,o&&u(n[0],n[1],o)&&(a=3>i?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&m>=e}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=n(63),v=n(9),m=9007199254740991,y="[object Function]",g="[object GeneratorFunction]",k=/^(?:0|[1-9]\d*)$/,b=t.Object.prototype,w=b.hasOwnProperty,P=b.toString,x=a("length"),T=s(function(e,t,n){o(t,p(t),e,n)});e.exports=T}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,t,n){var r=n?n.length:0;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t,n,r){return void 0===e||a(e,u[n])&&!c.call(r,n)?t:e}function a(e,t){return e===t||e!==e&&t!==t}var o=n(59),s=n(9),u=t.Object.prototype,c=u.hasOwnProperty,l=s(function(e){return e.push(void 0,i),r(o,void 0,e)});e.exports=l}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return e&&s(e,t,u)}function i(e){return"function"==typeof e?e:o}function a(e,t){return e&&r(e,i(t))}function o(e){return e}var s=n(57),u=n(62);e.exports=a},58,function(e,t){(function(t){function n(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function o(e){return function(t){return null==t?void 0:t[e]}}function s(e){var t=e?e.length:void 0;return d(t)&&(A(e)||m(e)||c(e))?n(t,String):null}function u(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||T;return e===n}function c(e){return f(e)&&O.call(e,"callee")&&(!j.call(e,"callee")||E.call(e)==k)}function l(e){return null!=e&&!("function"==typeof e&&h(e))&&d(R(e))}function f(e){return v(e)&&l(e)}function h(e){var t=p(e)?E.call(e):"";return t==b||t==w}function d(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function m(e){return"string"==typeof e||!A(e)&&v(e)&&E.call(e)==P}function y(e){for(var t=-1,n=u(e),i=a(e),o=i.length,c=s(e),l=!!c,f=c||[],h=f.length;++tt;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>i&&(t[r+i++]=c[e])});16>i;)t[r+i++]=0;return t}function i(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function a(e,t,n){var r=t&&n||0,a=t||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:d,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:v+1,c=s-p+(u-v)/1e4;if(0>c&&void 0===e.clockseq&&(o=o+1&16383),(0>c||s>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,v=u,d=o,s+=122192928e5;var l=(1e4*(268435455&s)+u)%4294967296;a[r++]=l>>>24&255,a[r++]=l>>>16&255,a[r++]=l>>>8&255,a[r++]=255&l;var f=s/4294967296*1e4&268435455;a[r++]=f>>>8&255,a[r++]=255&f,a[r++]=f>>>24&15|16,a[r++]=f>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=e.node||h,y=0;6>y;y++)a[r+y]=m[y];return t?t:i(a)}function o(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;16>o;o++)t[r+o]=a[o];return t||i(a)}for(var s=n(64),u=[],c={},l=0;256>l;l++)u[l]=(l+256).toString(16).substr(1),c[u[l]]=l;var f=s(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],d=16383&(f[6]<<8|f[7]),p=0,v=0,m=o;m.v1=a,m.v4=o,m.parse=r,m.unparse=i,e.exports=m},function(e,t,n){var r=n(19);e.exports=r},function(e,t,n){var r=n(80);e.exports=r},function(e,t,n){var r=n(71);e.exports=r},function(e,t){function n(e,t,n,i){return n&&0!==n.length?(n.sort(a),r(e,t,n,i,0)):{}}function r(e,t,n,a,s){if(a=a||{},e){i(n,s,s)&&(a[s]=e);var u=t.children;if(u)for(var c=e.childNodes,l=0;l=a;){if(r=(o+a)/2>>0,i=e[r],a===o)return i>=t&&n>=i;if(t>i)a=r+1;else{if(!(i>n))return!0;o=r-1}}return!1}function a(e,t){return e>t?1:-1}var o={};e.exports=n},function(e,t,n){function r(e,t,n){var r=e.type,c=e.vNode,d=e.patch;switch(r){case p.REMOVE:return i(t,c);case p.INSERT:return a(t,d,n);case p.VTEXT:return o(t,c,d,n);case p.WIDGET:return s(t,c,d,n);case p.VNODE:return u(t,c,d,n);case p.ORDER:return l(t,d),t;case p.PROPS:return h(t,d,c.properties),t;case p.THUNK:return f(t,n.patch(t,d,n));default:return t}}function i(e,t){var n=e.parentNode;return n&&n.removeChild(e),c(e,t),null}function a(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}function o(e,t,n,r){var i;if(3===e.nodeType)e.replaceData(0,e.length,n.text),i=e;else{var a=e.parentNode;i=r.render(n,r),a&&i!==e&&a.replaceChild(i,e)}return i}function s(e,t,n,r){var i,a=v(t,n);i=a?n.update(t,e)||e:r.render(n,r);var o=e.parentNode;return o&&i!==e&&o.replaceChild(i,e),a||c(e,t),i}function u(e,t,n,r){var i=e.parentNode,a=r.render(n,r);return i&&a!==e&&i.replaceChild(a,e),a}function c(e,t){"function"==typeof t.destroy&&d(t)&&t.destroy(e)}function l(e,t){for(var n,r,i,a=e.childNodes,o={},s=0;s=u++?null:a[i.to])}function f(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}var h=n(18),d=n(2),p=n(21),v=n(72);e.exports=r},function(e,t,n){function r(e,t,n){return n=n||{},n.patch=n.patch&&n.patch!==r?n.patch:i,n.render=n.render||c,n.patch(e,t,n)}function i(e,t,n){var r=o(t);if(0===r.length)return e;var i=l(e,t.a,r),u=e.ownerDocument;n.document||u===s||(n.document=u);for(var c=0;ck;k++){var b=n[k];a(b)?(d+=b.count||0,!p&&b.hasWidgets&&(p=!0),!v&&b.hasThunks&&(v=!0),m||!b.hooks&&!b.descendantHooks||(m=!0)):!p&&o(b)?"function"==typeof b.destroy&&(p=!0):!v&&s(b)&&(v=!0)}this.count=h+d,this.hasWidgets=p,this.hasThunks=v,this.hooks=f,this.descendantHooks=m}var i=n(4),a=n(3),o=n(2),s=n(5),u=n(6);e.exports=r;var c={},l=[];r.prototype.version=i,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=String(e)}var i=n(4);e.exports=r,r.prototype.version=i,r.prototype.type="VirtualText"},function(e,t,n){function r(e,t){var n;for(var s in e){s in t||(n=n||{},n[s]=void 0);var u=e[s],c=t[s];if(u!==c)if(a(u)&&a(c))if(i(c)!==i(u))n=n||{},n[s]=c;else if(o(c))n=n||{},n[s]=c;else{var l=r(u,c);l&&(n=n||{},n[s]=l)}else n=n||{},n[s]=c}for(var f in t)f in e||(n=n||{},n[f]=t[f]);return n}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var a=n(15),o=n(6);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return i(e,t,n,0),n}function i(e,t,n,r){if(e!==t){var i=n[r],s=!1;if(w(e)||w(t))u(e,t,n,r);else if(null==t)b(e)||(o(e,n,r),i=n[r]),i=v(i,new y(y.REMOVE,e,t));else if(g(t))if(g(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var c=x(e.properties,t.properties);c&&(i=v(i,new y(y.PROPS,e,c))),i=a(e,t,n,i,r)}else i=v(i,new y(y.VNODE,e,t)),s=!0;else i=v(i,new y(y.VNODE,e,t)),s=!0;else k(t)?k(e)?e.text!==t.text&&(i=v(i,new y(y.VTEXT,e,t))):(i=v(i,new y(y.VTEXT,e,t)),s=!0):b(t)&&(b(e)||(s=!0),i=v(i,new y(y.WIDGET,e,t)));i&&(n[r]=i),s&&o(e,n,r)}}function a(e,t,n,r,a){for(var o=e.children,s=h(o,t.children),u=s.children,c=o.length,l=u.length,f=c>l?c:l,d=0;f>d;d++){var p=o[d],m=u[d];a+=1,p?i(p,m,n,a):m&&(r=v(r,new y(y.INSERT,null,m))),g(p)&&p.count&&(a+=p.count)}return s.moves&&(r=v(r,new y(y.ORDER,e,s.moves))),r}function o(e,t,n){l(e,t,n),s(e,t,n)}function s(e,t,n){if(b(e))"function"==typeof e.destroy&&(t[n]=v(t[n],new y(y.REMOVE,e,null)));else if(g(e)&&(e.hasWidgets||e.hasThunks))for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,s(o,t,n),g(o)&&o.count&&(n+=o.count)}else w(e)&&u(e,null,t,n)}function u(e,t,n,i){var a=P(e,t),o=r(a.a,a.b);c(o)&&(n[i]=new y(y.THUNK,null,o))}function c(e){for(var t in e)if("a"!==t)return!0;return!1}function l(e,t,n){if(g(e)){if(e.hooks&&(t[n]=v(t[n],new y(y.PROPS,e,f(e.hooks)))),e.descendantHooks||e.hasThunks)for(var r=e.children,i=r.length,a=0;i>a;a++){var o=r[a];n+=1,l(o,t,n),g(o)&&o.count&&(n+=o.count)}}else w(e)&&u(e,null,t,n)}function f(e){var t={};for(var n in e)t[n]=void 0;return t}function h(e,t){var n=p(t),r=n.keys,i=n.free;if(i.length===t.length)return{children:t,moves:null};var a=p(e),o=a.keys,s=a.free;if(s.length===e.length)return{children:t,moves:null};for(var u=[],c=0,l=i.length,f=0,h=0;hc?(v=i[c++],u.push(t[v])):(v=h-f++,u.push(null))}for(var y=c>=i.length?t.length:i[c],g=0;g=y&&u.push(k)}for(var b,w=u.slice(),P=0,x=[],T=[],O=0;Oi;i++){var a=e[i];a.key?t[a.key]=i:n.push(i)}return{keys:t,free:n}}function v(e,t){return e?(m(e)?e.push(t):e=[e,t],e):t}var m=n(11),y=n(21),g=n(3),k=n(7),b=n(2),w=n(5),P=n(20),x=n(79);e.exports=r},function(module,exports){"use strict";function findMinMax(e){for(var t,n=1/0,r=-(1/0),i=0,a=e.length;a>i;i++)t=e[i],n>t&&(n=t),t>r&&(r=t);return{min:n,max:r}}function convert(e,t){var n=Math.pow(2,t-1),r=0>e?e*n:e*n-1;return Math.max(-n,Math.min(n-1,r))}function extractPeaks(channel,samplesPerPixel,bits){var i,chanLength=channel.length,numPeaks=Math.ceil(chanLength/samplesPerPixel),start,end,segment,max,min,extrema,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++)start=i*samplesPerPixel,end=(i+1)*samplesPerPixel>chanLength?chanLength:(i+1)*samplesPerPixel,segment=channel.subarray(start,end),extrema=findMinMax(segment),min=convert(extrema.min,bits),max=convert(extrema.max,bits),peaks[2*i]=min,peaks[2*i+1]=max;return peaks}function makeMono(channelPeaks,bits){var numChan=channelPeaks.length,weight=1/numChan,numPeaks=channelPeaks[0].length/2,c=0,i=0,min,max,peaks=new(eval("Int"+bits+"Array"))(2*numPeaks);for(i=0;numPeaks>i;i++){for(min=0,max=0,c=0;numChan>c;c++)min+=weight*channelPeaks[c][2*i],max+=weight*channelPeaks[c][2*i+1];peaks[2*i]=min,peaks[2*i+1]=max}return[peaks]}module.exports=function(e,t,n,r,i,a){if(t=t||1e4,a=a||8,n=n||!0,[8,16,32].indexOf(a)<0)throw new Error("Invalid number of bits specified for peaks.");var o,s,u,c,l=e.numberOfChannels,f=[];if("undefined"==typeof e.subarray)for(o=0;l>o;o++)u=e.getChannelData(o),r=r||0,i=i||u.length,c=u.subarray(r,i),f.push(extractPeaks(c,t,a));else r=r||0,i=i||e.length,f.push(extractPeaks(e.subarray(r,i),t,a));return n&&f.length>1&&(f=makeMono(f,a)),s=f[0].length/2,{length:s,data:f,bits:a}}},function(e,t,n){e.exports=function(){return new Worker(n.p+"f33623ca62a3dc982a82.worker.js")}},function(e,t){}])); \ No newline at end of file diff --git a/package.json b/package.json index 7425ff3e..3cd41725 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "waveform-playlist", "description": "Multiple track web audio editor and player with waveform preview", - "version": "1.0.8", + "version": "1.0.9", "main": "dist/js/waveform-playlist.commonjs2.js", "author": "Naomi Aro", "license": "MIT",