@exezt-/webamp 1.5.0-0x718 → 1.5.0-0x720

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1759,7 +1759,7 @@ formatters.j = function (v) {
1759
1759
  }
1760
1760
  };
1761
1761
 
1762
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
1762
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
1763
1763
 
1764
1764
  /***/ }),
1765
1765
  /* 11 */
@@ -4056,7 +4056,7 @@ __webpack_require__.r(__webpack_exports__);
4056
4056
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
4057
4057
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
4058
4058
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
4059
- /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
4059
+ /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
4060
4060
 
4061
4061
 
4062
4062
  /**
@@ -6787,293 +6787,6 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
6787
6787
 
6788
6788
  /***/ }),
6789
6789
  /* 26 */
6790
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6791
-
6792
- "use strict";
6793
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
6794
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6795
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
6796
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
6797
-
6798
-
6799
- class WinampTelegramCustomHandler {
6800
- constructor(emit, options) {
6801
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
6802
-
6803
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
6804
-
6805
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
6806
-
6807
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "options", void 0);
6808
-
6809
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadCustomTracks", tracks => {
6810
- var _this$webamp;
6811
-
6812
- ((_this$webamp = this.webamp) !== null && _this$webamp !== void 0 ? _this$webamp : window.__webamp).setTracksToPlay(tracks);
6813
- });
6814
-
6815
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
6816
- localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
6817
- });
6818
-
6819
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
6820
- fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
6821
- method: "GET",
6822
- headers: {
6823
- Accept: "application/json",
6824
- "Content-Type": "application/json"
6825
- }
6826
- }).then(async response => {
6827
- if (response.status === 200) {
6828
- return response.text();
6829
- } else {
6830
- return null;
6831
- }
6832
- }).then(async response => {
6833
- if (response !== null) {
6834
- var _JSON$parse;
6835
-
6836
- const data = (_JSON$parse = JSON.parse(response)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
6837
- let i = 0;
6838
- this.saveLastPlaylist(playlistLink);
6839
-
6840
- for (const item of data) {
6841
- if (i === 0) {
6842
- this.webamp.setTracksToPlay([{
6843
- defaultName: item.name,
6844
- url: `${item.file}&public_key=${item.public_key}`
6845
- }]);
6846
- } else {
6847
- this.webamp.appendTracks([{
6848
- defaultName: item.name,
6849
- url: `${item.file}&public_key=${item.public_key}`
6850
- }]);
6851
- }
6852
-
6853
- i++;
6854
- }
6855
- }
6856
- });
6857
- });
6858
-
6859
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
6860
- let public_key = new URL(track.url).searchParams.get("public_key");
6861
- await fetch(track.url, {
6862
- method: "GET"
6863
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
6864
- if (response.status === 302) {
6865
- return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
6866
- } else {
6867
- return response;
6868
- }
6869
- }).then(res => {
6870
- var _res$body;
6871
-
6872
- console.log(res);
6873
- const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
6874
- return new ReadableStream({
6875
- start(controller) {
6876
- // @ts-ignore
6877
- function pump() {
6878
- // @ts-ignore
6879
- return read === null || read === void 0 ? void 0 : read.read().then(({
6880
- done,
6881
- value
6882
- }) => {
6883
- if (done) {
6884
- controller.close();
6885
- return;
6886
- }
6887
-
6888
- controller.enqueue(value);
6889
- return pump();
6890
- });
6891
- }
6892
-
6893
- return pump();
6894
- }
6895
-
6896
- });
6897
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
6898
- let tracks = this.getAllTracks();
6899
- this.replaceTrack(track, tracks);
6900
- }).catch(err => err);
6901
- });
6902
-
6903
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
6904
- let trackId = this.webamp.store.getState().playlist.currentTrack;
6905
- return this.webamp.store.getState().tracks[trackId];
6906
- });
6907
-
6908
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
6909
- return this.webamp.store.getState().tracks;
6910
- });
6911
-
6912
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
6913
- let a = [];
6914
- Object.entries(tracks).forEach(([_key, value]) => {
6915
- if (value.id === track.id) {
6916
- a.push(track);
6917
- } else {
6918
- a.push(value);
6919
- }
6920
- });
6921
- this.webamp.setTracksToPlay(a);
6922
- });
6923
-
6924
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
6925
- document.cookie = `lastlist=${playlistLink}; path=/;`;
6926
- });
6927
-
6928
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
6929
- const regex = new RegExp(`(^| )${name}=([^;]+)`);
6930
- const match = document.cookie.match(regex);
6931
-
6932
- if (match) {
6933
- return match[2];
6934
- }
6935
- });
6936
-
6937
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
6938
- this.webamp.__loadSerializedState(opts);
6939
- });
6940
-
6941
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
6942
- let i = 0;
6943
- let vol = opts.media.volume;
6944
- let balance = opts.media.balance;
6945
- let eq1 = opts.equalizer.sliders.preamp;
6946
- let eq2 = opts.equalizer.sliders["60"];
6947
- let eq3 = opts.equalizer.sliders["170"];
6948
- let eq4 = opts.equalizer.sliders["310"];
6949
- let eq5 = opts.equalizer.sliders["600"];
6950
- let eq6 = opts.equalizer.sliders["1000"];
6951
- let eq7 = opts.equalizer.sliders["3000"];
6952
- let eq8 = opts.equalizer.sliders["6000"];
6953
- let eq9 = opts.equalizer.sliders["12000"];
6954
- let eq10 = opts.equalizer.sliders["14000"];
6955
- let eq11 = opts.equalizer.sliders["16000"];
6956
- let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
6957
- let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
6958
- this.webamp.store.dispatch({
6959
- type: "SET_VOLUME",
6960
- volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
6961
- });
6962
- this.webamp.store.dispatch({
6963
- type: "SET_BALANCE",
6964
- balance: balance
6965
- });
6966
- this.webamp.store.dispatch({
6967
- type: "SET_BAND_VALUE",
6968
- band: "preamp",
6969
- value: opts.equalizer.sliders.preamp
6970
- });
6971
-
6972
- for (const band of bands) {
6973
- this.webamp.store.dispatch({
6974
- type: "SET_BAND_VALUE",
6975
- band: band,
6976
- value: equal[i]
6977
- });
6978
- i++;
6979
- }
6980
-
6981
- if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
6982
- this.webamp.store.dispatch({
6983
- type: "TOGGLE_SHUFFLE"
6984
- });
6985
- }
6986
-
6987
- if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
6988
- this.webamp.store.dispatch({
6989
- type: "TOGGLE_REPEAT"
6990
- });
6991
- }
6992
- });
6993
-
6994
- this.options = options;
6995
- setTimeout(() => {
6996
- if (!window.__webamp) {
6997
- throw new Error("Webamp __webamp is undefined!!");
6998
- } else {
6999
- this.webamp = window.__webamp;
7000
- }
7001
-
7002
- if (typeof localStorage.getItem('app-state') !== "undefined") {
7003
- this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
7004
- } // emit
7005
-
7006
-
7007
- if (emit !== false) {
7008
- var _window, _window$Telegram;
7009
-
7010
- const lastList = this.getCookie('lastlist');
7011
-
7012
- if (typeof lastList !== "undefined") {
7013
- this.getTrackListFromYandexDisk(lastList);
7014
- } // @ts-ignore | because no global var telegram avail in project types
7015
-
7016
-
7017
- if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7018
- console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7019
- } else {
7020
- var _window2, _window2$Telegram;
7021
-
7022
- // @ts-ignore | because no global var telegram avail in project types
7023
- this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7024
- this.initializeTelegramWebAppEvents();
7025
- }
7026
-
7027
- this.initializeApplicationHandlers();
7028
- }
7029
- }, 1000);
7030
- }
7031
-
7032
- initializeTelegramWebAppEvents() {
7033
- this.telegram.offEvent("deactivated", () => {
7034
- this.updateAppState();
7035
- });
7036
- }
7037
-
7038
- initializeApplicationHandlers() {
7039
- const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7040
- window_handlers.forEach(handler => {
7041
- window.addEventListener(handler, () => {
7042
- this.updateAppState();
7043
- });
7044
- });
7045
- this.webamp.onTrackDidChange(() => {
7046
- console.log(this.webamp.store.getState());
7047
- this.updateAppState();
7048
- });
7049
- this.webamp.onWillClose(() => {
7050
- this.updateAppState();
7051
- });
7052
- this.webamp.onClose(() => {
7053
- this.updateAppState();
7054
- });
7055
- this.webamp.onMinimize(() => {
7056
- this.updateAppState();
7057
- });
7058
- this.webamp.store.dispatch({
7059
- type: "ENABLE_MILKDROP",
7060
- open: false
7061
- });
7062
- const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7063
-
7064
- this.webamp.__onStateChange(() => {
7065
- this.updateAppState();
7066
- });
7067
-
7068
- ev.forEach(ev => this.webamp.media.on(ev, () => {
7069
- this.updateAppState();
7070
- }));
7071
- }
7072
-
7073
- }
7074
-
7075
- /***/ }),
7076
- /* 27 */
7077
6790
  /***/ (function(module, exports, __webpack_require__) {
7078
6791
 
7079
6792
  "use strict";
@@ -7123,7 +6836,7 @@ module.exports = Duplex;
7123
6836
 
7124
6837
  /*<replacement>*/
7125
6838
  var util = Object.create(__webpack_require__(37));
7126
- util.inherits = __webpack_require__(34);
6839
+ util.inherits = __webpack_require__(33);
7127
6840
  /*</replacement>*/
7128
6841
 
7129
6842
  var Readable = __webpack_require__(110);
@@ -7210,7 +6923,7 @@ Duplex.prototype._destroy = function (err, cb) {
7210
6923
  };
7211
6924
 
7212
6925
  /***/ }),
7213
- /* 28 */
6926
+ /* 27 */
7214
6927
  /***/ (function(module, exports, __webpack_require__) {
7215
6928
 
7216
6929
  var root = __webpack_require__(82);
@@ -7222,7 +6935,7 @@ module.exports = Symbol;
7222
6935
 
7223
6936
 
7224
6937
  /***/ }),
7225
- /* 29 */
6938
+ /* 28 */
7226
6939
  /***/ (function(module, exports, __webpack_require__) {
7227
6940
 
7228
6941
  "use strict";
@@ -7234,13 +6947,13 @@ if (true) {
7234
6947
 
7235
6948
 
7236
6949
  /***/ }),
7237
- /* 30 */
6950
+ /* 29 */
7238
6951
  /***/ (function(module, exports, __webpack_require__) {
7239
6952
 
7240
6953
  "use strict";
7241
6954
 
7242
6955
 
7243
- var reactIs = __webpack_require__(29);
6956
+ var reactIs = __webpack_require__(28);
7244
6957
 
7245
6958
  /**
7246
6959
  * Copyright 2015, Yahoo! Inc.
@@ -7323,287 +7036,574 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
7323
7036
  var targetStatics = getStatics(targetComponent);
7324
7037
  var sourceStatics = getStatics(sourceComponent);
7325
7038
 
7326
- for (var i = 0; i < keys.length; ++i) {
7327
- var key = keys[i];
7039
+ for (var i = 0; i < keys.length; ++i) {
7040
+ var key = keys[i];
7041
+
7042
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7043
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7044
+
7045
+ try {
7046
+ // Avoid failures from read-only properties
7047
+ defineProperty(targetComponent, key, descriptor);
7048
+ } catch (e) {}
7049
+ }
7050
+ }
7051
+ }
7052
+
7053
+ return targetComponent;
7054
+ }
7055
+
7056
+ module.exports = hoistNonReactStatics;
7057
+
7058
+
7059
+ /***/ }),
7060
+ /* 30 */
7061
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
7062
+
7063
+ "use strict";
7064
+ /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7065
+ /* global window */
7066
+
7067
+
7068
+ var root;
7069
+
7070
+ if (typeof self !== 'undefined') {
7071
+ root = self;
7072
+ } else if (typeof window !== 'undefined') {
7073
+ root = window;
7074
+ } else if (typeof global !== 'undefined') {
7075
+ root = global;
7076
+ } else if (true) {
7077
+ root = module;
7078
+ } else {}
7079
+
7080
+ var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7081
+ /* harmony default export */ __webpack_exports__["a"] = (result);
7082
+
7083
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7084
+
7085
+ /***/ }),
7086
+ /* 31 */
7087
+ /***/ (function(module, exports, __webpack_require__) {
7088
+
7089
+ var parser = __webpack_require__(69);
7090
+
7091
+ var creator = __webpack_require__(70);
7092
+
7093
+ module.exports = {
7094
+ parser: parser,
7095
+ creator: creator
7096
+ };
7097
+
7098
+ /***/ }),
7099
+ /* 32 */
7100
+ /***/ (function(module, exports) {
7101
+
7102
+ // shim for using process in browser
7103
+ var process = module.exports = {};
7104
+
7105
+ // cached from whatever global is present so that test runners that stub it
7106
+ // don't break things. But we need to wrap it in a try catch in case it is
7107
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
7108
+ // function because try/catches deoptimize in certain engines.
7109
+
7110
+ var cachedSetTimeout;
7111
+ var cachedClearTimeout;
7112
+
7113
+ function defaultSetTimout() {
7114
+ throw new Error('setTimeout has not been defined');
7115
+ }
7116
+ function defaultClearTimeout () {
7117
+ throw new Error('clearTimeout has not been defined');
7118
+ }
7119
+ (function () {
7120
+ try {
7121
+ if (typeof setTimeout === 'function') {
7122
+ cachedSetTimeout = setTimeout;
7123
+ } else {
7124
+ cachedSetTimeout = defaultSetTimout;
7125
+ }
7126
+ } catch (e) {
7127
+ cachedSetTimeout = defaultSetTimout;
7128
+ }
7129
+ try {
7130
+ if (typeof clearTimeout === 'function') {
7131
+ cachedClearTimeout = clearTimeout;
7132
+ } else {
7133
+ cachedClearTimeout = defaultClearTimeout;
7134
+ }
7135
+ } catch (e) {
7136
+ cachedClearTimeout = defaultClearTimeout;
7137
+ }
7138
+ } ())
7139
+ function runTimeout(fun) {
7140
+ if (cachedSetTimeout === setTimeout) {
7141
+ //normal enviroments in sane situations
7142
+ return setTimeout(fun, 0);
7143
+ }
7144
+ // if setTimeout wasn't available but was latter defined
7145
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7146
+ cachedSetTimeout = setTimeout;
7147
+ return setTimeout(fun, 0);
7148
+ }
7149
+ try {
7150
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7151
+ return cachedSetTimeout(fun, 0);
7152
+ } catch(e){
7153
+ try {
7154
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7155
+ return cachedSetTimeout.call(null, fun, 0);
7156
+ } catch(e){
7157
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7158
+ return cachedSetTimeout.call(this, fun, 0);
7159
+ }
7160
+ }
7161
+
7162
+
7163
+ }
7164
+ function runClearTimeout(marker) {
7165
+ if (cachedClearTimeout === clearTimeout) {
7166
+ //normal enviroments in sane situations
7167
+ return clearTimeout(marker);
7168
+ }
7169
+ // if clearTimeout wasn't available but was latter defined
7170
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7171
+ cachedClearTimeout = clearTimeout;
7172
+ return clearTimeout(marker);
7173
+ }
7174
+ try {
7175
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7176
+ return cachedClearTimeout(marker);
7177
+ } catch (e){
7178
+ try {
7179
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7180
+ return cachedClearTimeout.call(null, marker);
7181
+ } catch (e){
7182
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7183
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7184
+ return cachedClearTimeout.call(this, marker);
7185
+ }
7186
+ }
7187
+
7188
+
7189
+
7190
+ }
7191
+ var queue = [];
7192
+ var draining = false;
7193
+ var currentQueue;
7194
+ var queueIndex = -1;
7195
+
7196
+ function cleanUpNextTick() {
7197
+ if (!draining || !currentQueue) {
7198
+ return;
7199
+ }
7200
+ draining = false;
7201
+ if (currentQueue.length) {
7202
+ queue = currentQueue.concat(queue);
7203
+ } else {
7204
+ queueIndex = -1;
7205
+ }
7206
+ if (queue.length) {
7207
+ drainQueue();
7208
+ }
7209
+ }
7210
+
7211
+ function drainQueue() {
7212
+ if (draining) {
7213
+ return;
7214
+ }
7215
+ var timeout = runTimeout(cleanUpNextTick);
7216
+ draining = true;
7217
+
7218
+ var len = queue.length;
7219
+ while(len) {
7220
+ currentQueue = queue;
7221
+ queue = [];
7222
+ while (++queueIndex < len) {
7223
+ if (currentQueue) {
7224
+ currentQueue[queueIndex].run();
7225
+ }
7226
+ }
7227
+ queueIndex = -1;
7228
+ len = queue.length;
7229
+ }
7230
+ currentQueue = null;
7231
+ draining = false;
7232
+ runClearTimeout(timeout);
7233
+ }
7234
+
7235
+ process.nextTick = function (fun) {
7236
+ var args = new Array(arguments.length - 1);
7237
+ if (arguments.length > 1) {
7238
+ for (var i = 1; i < arguments.length; i++) {
7239
+ args[i - 1] = arguments[i];
7240
+ }
7241
+ }
7242
+ queue.push(new Item(fun, args));
7243
+ if (queue.length === 1 && !draining) {
7244
+ runTimeout(drainQueue);
7245
+ }
7246
+ };
7247
+
7248
+ // v8 likes predictible objects
7249
+ function Item(fun, array) {
7250
+ this.fun = fun;
7251
+ this.array = array;
7252
+ }
7253
+ Item.prototype.run = function () {
7254
+ this.fun.apply(null, this.array);
7255
+ };
7256
+ process.title = 'browser';
7257
+ process.browser = true;
7258
+ process.env = {};
7259
+ process.argv = [];
7260
+ process.version = ''; // empty string to avoid regexp issues
7261
+ process.versions = {};
7262
+
7263
+ function noop() {}
7264
+
7265
+ process.on = noop;
7266
+ process.addListener = noop;
7267
+ process.once = noop;
7268
+ process.off = noop;
7269
+ process.removeListener = noop;
7270
+ process.removeAllListeners = noop;
7271
+ process.emit = noop;
7272
+ process.prependListener = noop;
7273
+ process.prependOnceListener = noop;
7274
+
7275
+ process.listeners = function (name) { return [] }
7276
+
7277
+ process.binding = function (name) {
7278
+ throw new Error('process.binding is not supported');
7279
+ };
7280
+
7281
+ process.cwd = function () { return '/' };
7282
+ process.chdir = function (dir) {
7283
+ throw new Error('process.chdir is not supported');
7284
+ };
7285
+ process.umask = function() { return 0; };
7328
7286
 
7329
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7330
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7331
7287
 
7332
- try {
7333
- // Avoid failures from read-only properties
7334
- defineProperty(targetComponent, key, descriptor);
7335
- } catch (e) {}
7336
- }
7288
+ /***/ }),
7289
+ /* 33 */
7290
+ /***/ (function(module, exports) {
7291
+
7292
+ if (typeof Object.create === 'function') {
7293
+ // implementation from standard node.js 'util' module
7294
+ module.exports = function inherits(ctor, superCtor) {
7295
+ if (superCtor) {
7296
+ ctor.super_ = superCtor
7297
+ ctor.prototype = Object.create(superCtor.prototype, {
7298
+ constructor: {
7299
+ value: ctor,
7300
+ enumerable: false,
7301
+ writable: true,
7302
+ configurable: true
7303
+ }
7304
+ })
7305
+ }
7306
+ };
7307
+ } else {
7308
+ // old school shim for old browsers
7309
+ module.exports = function inherits(ctor, superCtor) {
7310
+ if (superCtor) {
7311
+ ctor.super_ = superCtor
7312
+ var TempCtor = function () {}
7313
+ TempCtor.prototype = superCtor.prototype
7314
+ ctor.prototype = new TempCtor()
7315
+ ctor.prototype.constructor = ctor
7337
7316
  }
7338
7317
  }
7339
-
7340
- return targetComponent;
7341
7318
  }
7342
7319
 
7343
- module.exports = hoistNonReactStatics;
7344
-
7345
7320
 
7346
7321
  /***/ }),
7347
- /* 31 */
7322
+ /* 34 */
7348
7323
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7349
7324
 
7350
7325
  "use strict";
7351
- /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7352
- /* global window */
7353
-
7354
-
7355
- var root;
7326
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
7327
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
7328
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
7329
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
7356
7330
 
7357
- if (typeof self !== 'undefined') {
7358
- root = self;
7359
- } else if (typeof window !== 'undefined') {
7360
- root = window;
7361
- } else if (typeof global !== 'undefined') {
7362
- root = global;
7363
- } else if (true) {
7364
- root = module;
7365
- } else {}
7366
7331
 
7367
- var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7368
- /* harmony default export */ __webpack_exports__["a"] = (result);
7332
+ class WinampTelegramCustomHandler {
7333
+ constructor(emit, options) {
7334
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
7369
7335
 
7370
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7336
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
7371
7337
 
7372
- /***/ }),
7373
- /* 32 */
7374
- /***/ (function(module, exports, __webpack_require__) {
7338
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
7375
7339
 
7376
- var parser = __webpack_require__(69);
7340
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "options", void 0);
7377
7341
 
7378
- var creator = __webpack_require__(70);
7342
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadCustomTracks", tracks => {
7343
+ var _this$webamp;
7379
7344
 
7380
- module.exports = {
7381
- parser: parser,
7382
- creator: creator
7383
- };
7345
+ ((_this$webamp = this.webamp) !== null && _this$webamp !== void 0 ? _this$webamp : window.__webamp).setTracksToPlay(tracks);
7346
+ });
7384
7347
 
7385
- /***/ }),
7386
- /* 33 */
7387
- /***/ (function(module, exports) {
7348
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
7349
+ localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
7350
+ });
7388
7351
 
7389
- // shim for using process in browser
7390
- var process = module.exports = {};
7352
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
7353
+ fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
7354
+ method: "GET",
7355
+ headers: {
7356
+ Accept: "application/json",
7357
+ "Content-Type": "application/json"
7358
+ }
7359
+ }).then(async response => {
7360
+ if (response.status === 200) {
7361
+ return response.text();
7362
+ } else {
7363
+ return null;
7364
+ }
7365
+ }).then(async response => {
7366
+ if (response !== null) {
7367
+ var _JSON$parse;
7391
7368
 
7392
- // cached from whatever global is present so that test runners that stub it
7393
- // don't break things. But we need to wrap it in a try catch in case it is
7394
- // wrapped in strict mode code which doesn't define any globals. It's inside a
7395
- // function because try/catches deoptimize in certain engines.
7369
+ const data = (_JSON$parse = JSON.parse(response)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
7370
+ let i = 0;
7371
+ this.saveLastPlaylist(playlistLink);
7396
7372
 
7397
- var cachedSetTimeout;
7398
- var cachedClearTimeout;
7373
+ for (const item of data) {
7374
+ if (i === 0) {
7375
+ this.webamp.setTracksToPlay([{
7376
+ defaultName: item.name,
7377
+ url: `${item.file}&public_key=${item.public_key}`
7378
+ }]);
7379
+ } else {
7380
+ this.webamp.appendTracks([{
7381
+ defaultName: item.name,
7382
+ url: `${item.file}&public_key=${item.public_key}`
7383
+ }]);
7384
+ }
7399
7385
 
7400
- function defaultSetTimout() {
7401
- throw new Error('setTimeout has not been defined');
7402
- }
7403
- function defaultClearTimeout () {
7404
- throw new Error('clearTimeout has not been defined');
7405
- }
7406
- (function () {
7407
- try {
7408
- if (typeof setTimeout === 'function') {
7409
- cachedSetTimeout = setTimeout;
7410
- } else {
7411
- cachedSetTimeout = defaultSetTimout;
7386
+ i++;
7387
+ }
7412
7388
  }
7413
- } catch (e) {
7414
- cachedSetTimeout = defaultSetTimout;
7415
- }
7416
- try {
7417
- if (typeof clearTimeout === 'function') {
7418
- cachedClearTimeout = clearTimeout;
7389
+ });
7390
+ });
7391
+
7392
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
7393
+ let public_key = new URL(track.url).searchParams.get("public_key");
7394
+ await fetch(track.url, {
7395
+ method: "GET"
7396
+ }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
7397
+ if (response.status === 302) {
7398
+ return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
7419
7399
  } else {
7420
- cachedClearTimeout = defaultClearTimeout;
7421
- }
7422
- } catch (e) {
7423
- cachedClearTimeout = defaultClearTimeout;
7424
- }
7425
- } ())
7426
- function runTimeout(fun) {
7427
- if (cachedSetTimeout === setTimeout) {
7428
- //normal enviroments in sane situations
7429
- return setTimeout(fun, 0);
7430
- }
7431
- // if setTimeout wasn't available but was latter defined
7432
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7433
- cachedSetTimeout = setTimeout;
7434
- return setTimeout(fun, 0);
7435
- }
7436
- try {
7437
- // when when somebody has screwed with setTimeout but no I.E. maddness
7438
- return cachedSetTimeout(fun, 0);
7439
- } catch(e){
7440
- try {
7441
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7442
- return cachedSetTimeout.call(null, fun, 0);
7443
- } catch(e){
7444
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7445
- return cachedSetTimeout.call(this, fun, 0);
7400
+ return response;
7446
7401
  }
7447
- }
7402
+ }).then(res => {
7403
+ var _res$body;
7448
7404
 
7405
+ console.log(res);
7406
+ const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
7407
+ return new ReadableStream({
7408
+ start(controller) {
7409
+ // @ts-ignore
7410
+ function pump() {
7411
+ // @ts-ignore
7412
+ return read === null || read === void 0 ? void 0 : read.read().then(({
7413
+ done,
7414
+ value
7415
+ }) => {
7416
+ if (done) {
7417
+ controller.close();
7418
+ return;
7419
+ }
7449
7420
 
7450
- }
7451
- function runClearTimeout(marker) {
7452
- if (cachedClearTimeout === clearTimeout) {
7453
- //normal enviroments in sane situations
7454
- return clearTimeout(marker);
7455
- }
7456
- // if clearTimeout wasn't available but was latter defined
7457
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7458
- cachedClearTimeout = clearTimeout;
7459
- return clearTimeout(marker);
7460
- }
7461
- try {
7462
- // when when somebody has screwed with setTimeout but no I.E. maddness
7463
- return cachedClearTimeout(marker);
7464
- } catch (e){
7465
- try {
7466
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7467
- return cachedClearTimeout.call(null, marker);
7468
- } catch (e){
7469
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7470
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7471
- return cachedClearTimeout.call(this, marker);
7421
+ controller.enqueue(value);
7422
+ return pump();
7423
+ });
7424
+ }
7425
+
7426
+ return pump();
7427
+ }
7428
+
7429
+ });
7430
+ }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
7431
+ let tracks = this.getAllTracks();
7432
+ this.replaceTrack(track, tracks);
7433
+ }).catch(err => err);
7434
+ });
7435
+
7436
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
7437
+ let trackId = this.webamp.store.getState().playlist.currentTrack;
7438
+ return this.webamp.store.getState().tracks[trackId];
7439
+ });
7440
+
7441
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
7442
+ return this.webamp.store.getState().tracks;
7443
+ });
7444
+
7445
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
7446
+ let a = [];
7447
+ Object.entries(tracks).forEach(([_key, value]) => {
7448
+ if (value.id === track.id) {
7449
+ a.push(track);
7450
+ } else {
7451
+ a.push(value);
7472
7452
  }
7473
- }
7453
+ });
7454
+ this.webamp.setTracksToPlay(a);
7455
+ });
7474
7456
 
7457
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
7458
+ document.cookie = `lastlist=${playlistLink}; path=/;`;
7459
+ });
7475
7460
 
7461
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
7462
+ const regex = new RegExp(`(^| )${name}=([^;]+)`);
7463
+ const match = document.cookie.match(regex);
7476
7464
 
7477
- }
7478
- var queue = [];
7479
- var draining = false;
7480
- var currentQueue;
7481
- var queueIndex = -1;
7465
+ if (match) {
7466
+ return match[2];
7467
+ }
7468
+ });
7482
7469
 
7483
- function cleanUpNextTick() {
7484
- if (!draining || !currentQueue) {
7485
- return;
7486
- }
7487
- draining = false;
7488
- if (currentQueue.length) {
7489
- queue = currentQueue.concat(queue);
7490
- } else {
7491
- queueIndex = -1;
7492
- }
7493
- if (queue.length) {
7494
- drainQueue();
7495
- }
7496
- }
7470
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
7471
+ this.webamp.__loadSerializedState(opts);
7472
+ });
7497
7473
 
7498
- function drainQueue() {
7499
- if (draining) {
7500
- return;
7501
- }
7502
- var timeout = runTimeout(cleanUpNextTick);
7503
- draining = true;
7474
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
7475
+ let i = 0;
7476
+ let vol = opts.media.volume;
7477
+ let balance = opts.media.balance;
7478
+ let eq1 = opts.equalizer.sliders.preamp;
7479
+ let eq2 = opts.equalizer.sliders["60"];
7480
+ let eq3 = opts.equalizer.sliders["170"];
7481
+ let eq4 = opts.equalizer.sliders["310"];
7482
+ let eq5 = opts.equalizer.sliders["600"];
7483
+ let eq6 = opts.equalizer.sliders["1000"];
7484
+ let eq7 = opts.equalizer.sliders["3000"];
7485
+ let eq8 = opts.equalizer.sliders["6000"];
7486
+ let eq9 = opts.equalizer.sliders["12000"];
7487
+ let eq10 = opts.equalizer.sliders["14000"];
7488
+ let eq11 = opts.equalizer.sliders["16000"];
7489
+ let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
7490
+ let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
7491
+ this.webamp.store.dispatch({
7492
+ type: "SET_VOLUME",
7493
+ volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
7494
+ });
7495
+ this.webamp.store.dispatch({
7496
+ type: "SET_BALANCE",
7497
+ balance: balance
7498
+ });
7499
+ this.webamp.store.dispatch({
7500
+ type: "SET_BAND_VALUE",
7501
+ band: "preamp",
7502
+ value: opts.equalizer.sliders.preamp
7503
+ });
7504
7504
 
7505
- var len = queue.length;
7506
- while(len) {
7507
- currentQueue = queue;
7508
- queue = [];
7509
- while (++queueIndex < len) {
7510
- if (currentQueue) {
7511
- currentQueue[queueIndex].run();
7512
- }
7513
- }
7514
- queueIndex = -1;
7515
- len = queue.length;
7516
- }
7517
- currentQueue = null;
7518
- draining = false;
7519
- runClearTimeout(timeout);
7520
- }
7505
+ for (const band of bands) {
7506
+ this.webamp.store.dispatch({
7507
+ type: "SET_BAND_VALUE",
7508
+ band: band,
7509
+ value: equal[i]
7510
+ });
7511
+ i++;
7512
+ }
7521
7513
 
7522
- process.nextTick = function (fun) {
7523
- var args = new Array(arguments.length - 1);
7524
- if (arguments.length > 1) {
7525
- for (var i = 1; i < arguments.length; i++) {
7526
- args[i - 1] = arguments[i];
7527
- }
7528
- }
7529
- queue.push(new Item(fun, args));
7530
- if (queue.length === 1 && !draining) {
7531
- runTimeout(drainQueue);
7532
- }
7533
- };
7514
+ if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
7515
+ this.webamp.store.dispatch({
7516
+ type: "TOGGLE_SHUFFLE"
7517
+ });
7518
+ }
7534
7519
 
7535
- // v8 likes predictible objects
7536
- function Item(fun, array) {
7537
- this.fun = fun;
7538
- this.array = array;
7539
- }
7540
- Item.prototype.run = function () {
7541
- this.fun.apply(null, this.array);
7542
- };
7543
- process.title = 'browser';
7544
- process.browser = true;
7545
- process.env = {};
7546
- process.argv = [];
7547
- process.version = ''; // empty string to avoid regexp issues
7548
- process.versions = {};
7520
+ if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
7521
+ this.webamp.store.dispatch({
7522
+ type: "TOGGLE_REPEAT"
7523
+ });
7524
+ }
7525
+ });
7549
7526
 
7550
- function noop() {}
7527
+ this.options = options;
7528
+ setTimeout(() => {
7529
+ if (!window.__webamp) {
7530
+ throw new Error("Webamp __webamp is undefined!!");
7531
+ } else {
7532
+ this.webamp = window.__webamp;
7533
+ }
7551
7534
 
7552
- process.on = noop;
7553
- process.addListener = noop;
7554
- process.once = noop;
7555
- process.off = noop;
7556
- process.removeListener = noop;
7557
- process.removeAllListeners = noop;
7558
- process.emit = noop;
7559
- process.prependListener = noop;
7560
- process.prependOnceListener = noop;
7535
+ if (typeof localStorage.getItem('app-state') !== "undefined") {
7536
+ this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
7537
+ } // emit
7561
7538
 
7562
- process.listeners = function (name) { return [] }
7563
7539
 
7564
- process.binding = function (name) {
7565
- throw new Error('process.binding is not supported');
7566
- };
7540
+ if (emit !== false) {
7541
+ var _window, _window$Telegram;
7567
7542
 
7568
- process.cwd = function () { return '/' };
7569
- process.chdir = function (dir) {
7570
- throw new Error('process.chdir is not supported');
7571
- };
7572
- process.umask = function() { return 0; };
7543
+ const lastList = this.getCookie('lastlist');
7573
7544
 
7545
+ if (typeof lastList !== "undefined") {
7546
+ this.getTrackListFromYandexDisk(lastList);
7547
+ } // @ts-ignore | because no global var telegram avail in project types
7574
7548
 
7575
- /***/ }),
7576
- /* 34 */
7577
- /***/ (function(module, exports) {
7578
7549
 
7579
- if (typeof Object.create === 'function') {
7580
- // implementation from standard node.js 'util' module
7581
- module.exports = function inherits(ctor, superCtor) {
7582
- if (superCtor) {
7583
- ctor.super_ = superCtor
7584
- ctor.prototype = Object.create(superCtor.prototype, {
7585
- constructor: {
7586
- value: ctor,
7587
- enumerable: false,
7588
- writable: true,
7589
- configurable: true
7550
+ if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7551
+ console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7552
+ } else {
7553
+ var _window2, _window2$Telegram;
7554
+
7555
+ // @ts-ignore | because no global var telegram avail in project types
7556
+ this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7557
+ this.initializeTelegramWebAppEvents();
7590
7558
  }
7591
- })
7592
- }
7593
- };
7594
- } else {
7595
- // old school shim for old browsers
7596
- module.exports = function inherits(ctor, superCtor) {
7597
- if (superCtor) {
7598
- ctor.super_ = superCtor
7599
- var TempCtor = function () {}
7600
- TempCtor.prototype = superCtor.prototype
7601
- ctor.prototype = new TempCtor()
7602
- ctor.prototype.constructor = ctor
7603
- }
7559
+
7560
+ this.initializeApplicationHandlers();
7561
+ }
7562
+ }, 1000);
7563
+ }
7564
+
7565
+ initializeTelegramWebAppEvents() {
7566
+ this.telegram.offEvent("deactivated", () => {
7567
+ this.updateAppState();
7568
+ });
7569
+ }
7570
+
7571
+ initializeApplicationHandlers() {
7572
+ const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7573
+ window_handlers.forEach(handler => {
7574
+ window.addEventListener(handler, () => {
7575
+ this.updateAppState();
7576
+ });
7577
+ });
7578
+ this.webamp.onTrackDidChange(() => {
7579
+ console.log(this.webamp.store.getState());
7580
+ this.updateAppState();
7581
+ });
7582
+ this.webamp.onWillClose(() => {
7583
+ this.updateAppState();
7584
+ });
7585
+ this.webamp.onClose(() => {
7586
+ this.updateAppState();
7587
+ });
7588
+ this.webamp.onMinimize(() => {
7589
+ this.updateAppState();
7590
+ });
7591
+ this.webamp.store.dispatch({
7592
+ type: "ENABLE_MILKDROP",
7593
+ open: false
7594
+ });
7595
+ const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7596
+
7597
+ this.webamp.__onStateChange(() => {
7598
+ this.updateAppState();
7599
+ });
7600
+
7601
+ ev.forEach(ev => this.webamp.media.on(ev, () => {
7602
+ this.updateAppState();
7603
+ }));
7604
7604
  }
7605
- }
7606
7605
 
7606
+ }
7607
7607
 
7608
7608
  /***/ }),
7609
7609
  /* 35 */
@@ -8427,7 +8427,7 @@ function nextTick(fn, arg1, arg2, arg3) {
8427
8427
  }
8428
8428
 
8429
8429
 
8430
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
8430
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
8431
8431
 
8432
8432
  /***/ }),
8433
8433
  /* 48 */
@@ -8988,11 +8988,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
8988
8988
  return target;
8989
8989
  }
8990
8990
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
8991
- var hoist_non_react_statics_cjs = __webpack_require__(30);
8991
+ var hoist_non_react_statics_cjs = __webpack_require__(29);
8992
8992
  var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
8993
8993
 
8994
8994
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-is/index.js
8995
- var react_is = __webpack_require__(29);
8995
+ var react_is = __webpack_require__(28);
8996
8996
 
8997
8997
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
8998
8998
  // React currently throws a warning when using useLayoutEffect on the server.
@@ -13009,7 +13009,7 @@ function toggleEqAuto() {
13009
13009
  };
13010
13010
  }
13011
13011
  // EXTERNAL MODULE: ../winamp-eqf/index.js
13012
- var winamp_eqf = __webpack_require__(32);
13012
+ var winamp_eqf = __webpack_require__(31);
13013
13013
 
13014
13014
  // CONCATENATED MODULE: ./js/skinSprites.ts
13015
13015
 
@@ -15143,7 +15143,7 @@ function selectAll() {
15143
15143
  };
15144
15144
  }
15145
15145
  // EXTERNAL MODULE: ./js/lib/webamp-telegram-handler.ts
15146
- var webamp_telegram_handler = __webpack_require__(26);
15146
+ var webamp_telegram_handler = __webpack_require__(34);
15147
15147
 
15148
15148
  // CONCATENATED MODULE: ./js/actionCreators/files.ts
15149
15149
 
@@ -15569,8 +15569,7 @@ function files_addFilesFromUrl(atIndex = 0) {
15569
15569
  // }
15570
15570
  // };
15571
15571
  }
15572
- function files_addFilesFromList() {
15573
- new webamp_telegram_handler["a" /* default */](false).loadCustomTracks(); // return async (dispatch, getState, { handleLoadListEvent }) => {
15572
+ function files_addFilesFromList() {// return async (dispatch, getState, { handleLoadListEvent }) => {
15574
15573
  // if (handleLoadListEvent) {
15575
15574
  // const tracks = await handleLoadListEvent();
15576
15575
  //
@@ -19586,8 +19585,8 @@ function ListMenu() {
19586
19585
  className: "save-list",
19587
19586
  onClick: saveFilesToList
19588
19587
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
19589
- className: "load-list",
19590
- onClick: addFilesFromList
19588
+ className: "load-list" // onClick={addFilesFromList}
19589
+
19591
19590
  })]
19592
19591
  });
19593
19592
  }
@@ -23090,7 +23089,7 @@ exports = module.exports = __webpack_require__(110);
23090
23089
  exports.Stream = exports;
23091
23090
  exports.Readable = exports;
23092
23091
  exports.Writable = __webpack_require__(56);
23093
- exports.Duplex = __webpack_require__(27);
23092
+ exports.Duplex = __webpack_require__(26);
23094
23093
  exports.Transform = __webpack_require__(114);
23095
23094
  exports.PassThrough = __webpack_require__(156);
23096
23095
 
@@ -23167,7 +23166,7 @@ Writable.WritableState = WritableState;
23167
23166
 
23168
23167
  /*<replacement>*/
23169
23168
  var util = Object.create(__webpack_require__(37));
23170
- util.inherits = __webpack_require__(34);
23169
+ util.inherits = __webpack_require__(33);
23171
23170
  /*</replacement>*/
23172
23171
 
23173
23172
  /*<replacement>*/
@@ -23200,7 +23199,7 @@ util.inherits(Writable, Stream);
23200
23199
  function nop() {}
23201
23200
 
23202
23201
  function WritableState(options, stream) {
23203
- Duplex = Duplex || __webpack_require__(27);
23202
+ Duplex = Duplex || __webpack_require__(26);
23204
23203
 
23205
23204
  options = options || {};
23206
23205
 
@@ -23350,7 +23349,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
23350
23349
  }
23351
23350
 
23352
23351
  function Writable(options) {
23353
- Duplex = Duplex || __webpack_require__(27);
23352
+ Duplex = Duplex || __webpack_require__(26);
23354
23353
 
23355
23354
  // Writable ctor is applied to Duplexes, too.
23356
23355
  // `realHasInstance` is necessary because using plain `instanceof`
@@ -23787,7 +23786,7 @@ Writable.prototype._destroy = function (err, cb) {
23787
23786
  this.end();
23788
23787
  cb(err);
23789
23788
  };
23790
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23789
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23791
23790
 
23792
23791
  /***/ }),
23793
23792
  /* 57 */
@@ -24934,7 +24933,7 @@ module.exports = toString;
24934
24933
  /* 81 */
24935
24934
  /***/ (function(module, exports, __webpack_require__) {
24936
24935
 
24937
- var Symbol = __webpack_require__(28),
24936
+ var Symbol = __webpack_require__(27),
24938
24937
  arrayMap = __webpack_require__(84),
24939
24938
  isArray = __webpack_require__(85),
24940
24939
  isSymbol = __webpack_require__(86);
@@ -25097,7 +25096,7 @@ module.exports = isSymbol;
25097
25096
  /* 87 */
25098
25097
  /***/ (function(module, exports, __webpack_require__) {
25099
25098
 
25100
- var Symbol = __webpack_require__(28),
25099
+ var Symbol = __webpack_require__(27),
25101
25100
  getRawTag = __webpack_require__(88),
25102
25101
  objectToString = __webpack_require__(89);
25103
25102
 
@@ -25131,7 +25130,7 @@ module.exports = baseGetTag;
25131
25130
  /* 88 */
25132
25131
  /***/ (function(module, exports, __webpack_require__) {
25133
25132
 
25134
- var Symbol = __webpack_require__(28);
25133
+ var Symbol = __webpack_require__(27);
25135
25134
 
25136
25135
  /** Used for built-in method references. */
25137
25136
  var objectProto = Object.prototype;
@@ -27004,7 +27003,7 @@ fileType.stream = readableStream => new Promise((resolve, reject) => {
27004
27003
  module.exports = Stream;
27005
27004
 
27006
27005
  var EE = __webpack_require__(54).EventEmitter;
27007
- var inherits = __webpack_require__(34);
27006
+ var inherits = __webpack_require__(33);
27008
27007
 
27009
27008
  inherits(Stream, EE);
27010
27009
  Stream.Readable = __webpack_require__(55);
@@ -27181,7 +27180,7 @@ function _isUint8Array(obj) {
27181
27180
 
27182
27181
  /*<replacement>*/
27183
27182
  var util = Object.create(__webpack_require__(37));
27184
- util.inherits = __webpack_require__(34);
27183
+ util.inherits = __webpack_require__(33);
27185
27184
  /*</replacement>*/
27186
27185
 
27187
27186
  /*<replacement>*/
@@ -27215,7 +27214,7 @@ function prependListener(emitter, event, fn) {
27215
27214
  }
27216
27215
 
27217
27216
  function ReadableState(options, stream) {
27218
- Duplex = Duplex || __webpack_require__(27);
27217
+ Duplex = Duplex || __webpack_require__(26);
27219
27218
 
27220
27219
  options = options || {};
27221
27220
 
@@ -27292,7 +27291,7 @@ function ReadableState(options, stream) {
27292
27291
  }
27293
27292
 
27294
27293
  function Readable(options) {
27295
- Duplex = Duplex || __webpack_require__(27);
27294
+ Duplex = Duplex || __webpack_require__(26);
27296
27295
 
27297
27296
  if (!(this instanceof Readable)) return new Readable(options);
27298
27297
 
@@ -28133,7 +28132,7 @@ function indexOf(xs, x) {
28133
28132
  }
28134
28133
  return -1;
28135
28134
  }
28136
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
28135
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
28137
28136
 
28138
28137
  /***/ }),
28139
28138
  /* 111 */
@@ -28596,11 +28595,11 @@ function simpleEnd(buf) {
28596
28595
 
28597
28596
  module.exports = Transform;
28598
28597
 
28599
- var Duplex = __webpack_require__(27);
28598
+ var Duplex = __webpack_require__(26);
28600
28599
 
28601
28600
  /*<replacement>*/
28602
28601
  var util = Object.create(__webpack_require__(37));
28603
- util.inherits = __webpack_require__(34);
28602
+ util.inherits = __webpack_require__(33);
28604
28603
  /*</replacement>*/
28605
28604
 
28606
28605
  util.inherits(Transform, Duplex);
@@ -29375,7 +29374,7 @@ __webpack_require__.r(__webpack_exports__);
29375
29374
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
29376
29375
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__);
29377
29376
  /* harmony import */ var _webampLazy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
29378
- /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
29377
+ /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
29379
29378
 
29380
29379
 
29381
29380
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -29746,7 +29745,7 @@ function fromByteArray (uint8) {
29746
29745
  attachTo.clearImmediate = clearImmediate;
29747
29746
  }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
29748
29747
 
29749
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
29748
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
29750
29749
 
29751
29750
  /***/ }),
29752
29751
  /* 123 */
@@ -31306,7 +31305,7 @@ function callbackify(original) {
31306
31305
  }
31307
31306
  exports.callbackify = callbackify;
31308
31307
 
31309
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
31308
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
31310
31309
 
31311
31310
  /***/ }),
31312
31311
  /* 130 */
@@ -33868,7 +33867,7 @@ var Transform = __webpack_require__(114);
33868
33867
 
33869
33868
  /*<replacement>*/
33870
33869
  var util = Object.create(__webpack_require__(37));
33871
- util.inherits = __webpack_require__(34);
33870
+ util.inherits = __webpack_require__(33);
33872
33871
  /*</replacement>*/
33873
33872
 
33874
33873
  util.inherits(PassThrough, Transform);
@@ -33894,7 +33893,7 @@ module.exports = __webpack_require__(56);
33894
33893
  /* 158 */
33895
33894
  /***/ (function(module, exports, __webpack_require__) {
33896
33895
 
33897
- module.exports = __webpack_require__(27);
33896
+ module.exports = __webpack_require__(26);
33898
33897
 
33899
33898
 
33900
33899
  /***/ }),