@bigbinary/neeto-media-recorder 2.6.19 → 2.7.1
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.
- package/constants.js +6 -6
- package/constants.js.map +1 -1
- package/core.js +398 -456
- package/core.js.map +1 -1
- package/index.js +299 -318
- package/index.js.map +1 -1
- package/package.json +1 -1
package/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isNotEmpty, existsBy, isNot, noop } from '@bigbinary/neeto-cist';
|
|
3
|
+
import { MIME_TYPE as MIME_TYPE$1, UPLOAD_EVENT, UPLOAD_STATUS, SCREEN_RECORDER_STATUS, START_RECORDING_SOUND, RECORDING_LIMIT_REACHED_WARNING_SOUND, RECORDING_TIME_LIMIT_FREE_PLAN, SCREEN_RECORDER_ERROR, SCREEN_RECORDER_EVENT, ONE_SECOND, HALF_A_SECOND_IN_MILLISECONDS, ONE_SECOND_IN_MILLISECONDS, TWO_HUNDRED_MILLISECONDS, ONE_MINUTE_IN_MILLISECONDS, STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND, IS_EXTENSION } from '@bigbinary/neeto-media-recorder/constants';
|
|
4
4
|
import { useMultipartS3UploadStatus as useMultipartS3UploadStatus$1, getMultipartS3Uploader as getMultipartS3Uploader$1 } from '@bigbinary/neeto-media-recorder/core';
|
|
5
5
|
import { isNotNil, min, isNil, identity, isEmpty, pick, equals, not } from 'ramda';
|
|
6
6
|
import platform from 'platform';
|
|
@@ -8,166 +8,141 @@ import withImmutableActions from '@bigbinary/neeto-commons-frontend/react-utils/
|
|
|
8
8
|
import { create as create$3 } from 'zustand';
|
|
9
9
|
import { useSyncExternalStore } from 'react';
|
|
10
10
|
|
|
11
|
-
function _arrayLikeToArray(
|
|
12
|
-
|
|
13
|
-
for (var
|
|
14
|
-
return
|
|
11
|
+
function _arrayLikeToArray(r, a) {
|
|
12
|
+
(null == a || a > r.length) && (a = r.length);
|
|
13
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
14
|
+
return n;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function _arrayWithoutHoles(
|
|
18
|
-
if (Array.isArray(
|
|
17
|
+
function _arrayWithoutHoles(r) {
|
|
18
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function _iterableToArray(
|
|
22
|
-
if (typeof Symbol
|
|
21
|
+
function _iterableToArray(r) {
|
|
22
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function _unsupportedIterableToArray(
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
+
function _unsupportedIterableToArray(r, a) {
|
|
26
|
+
if (r) {
|
|
27
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
28
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
29
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
30
|
+
}
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
function _nonIterableSpread() {
|
|
35
34
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
function _toConsumableArray(
|
|
39
|
-
return _arrayWithoutHoles(
|
|
37
|
+
function _toConsumableArray(r) {
|
|
38
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
function asyncGeneratorStep(
|
|
41
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
43
42
|
try {
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
} catch (
|
|
47
|
-
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (info.done) {
|
|
51
|
-
resolve(value);
|
|
52
|
-
} else {
|
|
53
|
-
Promise.resolve(value).then(_next, _throw);
|
|
43
|
+
var i = n[a](c),
|
|
44
|
+
u = i.value;
|
|
45
|
+
} catch (n) {
|
|
46
|
+
return void e(n);
|
|
54
47
|
}
|
|
48
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
55
49
|
}
|
|
56
|
-
function _asyncToGenerator(
|
|
50
|
+
function _asyncToGenerator(n) {
|
|
57
51
|
return function () {
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
return new Promise(function (
|
|
61
|
-
var
|
|
62
|
-
function _next(
|
|
63
|
-
asyncGeneratorStep(
|
|
52
|
+
var t = this,
|
|
53
|
+
e = arguments;
|
|
54
|
+
return new Promise(function (r, o) {
|
|
55
|
+
var a = n.apply(t, e);
|
|
56
|
+
function _next(n) {
|
|
57
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
64
58
|
}
|
|
65
|
-
function _throw(
|
|
66
|
-
asyncGeneratorStep(
|
|
59
|
+
function _throw(n) {
|
|
60
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
67
61
|
}
|
|
68
|
-
_next(
|
|
62
|
+
_next(void 0);
|
|
69
63
|
});
|
|
70
64
|
};
|
|
71
65
|
}
|
|
72
66
|
|
|
73
|
-
function _classCallCheck(
|
|
74
|
-
if (!(
|
|
75
|
-
throw new TypeError("Cannot call a class as a function");
|
|
76
|
-
}
|
|
67
|
+
function _classCallCheck(a, n) {
|
|
68
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
77
69
|
}
|
|
78
70
|
|
|
79
|
-
function _typeof$1(
|
|
71
|
+
function _typeof$1(o) {
|
|
80
72
|
"@babel/helpers - typeof";
|
|
81
73
|
|
|
82
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
83
|
-
return typeof
|
|
84
|
-
} : function (
|
|
85
|
-
return
|
|
86
|
-
}, _typeof$1(
|
|
74
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
75
|
+
return typeof o;
|
|
76
|
+
} : function (o) {
|
|
77
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
78
|
+
}, _typeof$1(o);
|
|
87
79
|
}
|
|
88
80
|
|
|
89
|
-
function
|
|
90
|
-
if (_typeof$1(
|
|
91
|
-
var
|
|
92
|
-
if (
|
|
93
|
-
var
|
|
94
|
-
if (_typeof$1(
|
|
81
|
+
function toPrimitive(t, r) {
|
|
82
|
+
if ("object" != _typeof$1(t) || !t) return t;
|
|
83
|
+
var e = t[Symbol.toPrimitive];
|
|
84
|
+
if (void 0 !== e) {
|
|
85
|
+
var i = e.call(t, r || "default");
|
|
86
|
+
if ("object" != _typeof$1(i)) return i;
|
|
95
87
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
96
88
|
}
|
|
97
|
-
return (String )(
|
|
89
|
+
return ("string" === r ? String : Number)(t);
|
|
98
90
|
}
|
|
99
91
|
|
|
100
|
-
function
|
|
101
|
-
var
|
|
102
|
-
return _typeof$1(
|
|
92
|
+
function toPropertyKey(t) {
|
|
93
|
+
var i = toPrimitive(t, "string");
|
|
94
|
+
return "symbol" == _typeof$1(i) ? i : i + "";
|
|
103
95
|
}
|
|
104
96
|
|
|
105
|
-
function _defineProperties(
|
|
106
|
-
for (var
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
descriptor.configurable = true;
|
|
110
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
111
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
97
|
+
function _defineProperties(e, r) {
|
|
98
|
+
for (var t = 0; t < r.length; t++) {
|
|
99
|
+
var o = r[t];
|
|
100
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
112
101
|
}
|
|
113
102
|
}
|
|
114
|
-
function _createClass(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
return Constructor;
|
|
103
|
+
function _createClass(e, r, t) {
|
|
104
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
105
|
+
writable: !1
|
|
106
|
+
}), e;
|
|
120
107
|
}
|
|
121
108
|
|
|
122
|
-
function _defineProperty(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
writable: true
|
|
130
|
-
});
|
|
131
|
-
} else {
|
|
132
|
-
obj[key] = value;
|
|
133
|
-
}
|
|
134
|
-
return obj;
|
|
109
|
+
function _defineProperty(e, r, t) {
|
|
110
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
111
|
+
value: t,
|
|
112
|
+
enumerable: !0,
|
|
113
|
+
configurable: !0,
|
|
114
|
+
writable: !0
|
|
115
|
+
}) : e[r] = t, e;
|
|
135
116
|
}
|
|
136
117
|
|
|
137
|
-
function _classApplyDescriptorSet(
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (!descriptor.writable) {
|
|
142
|
-
throw new TypeError("attempted to set read only private field");
|
|
143
|
-
}
|
|
144
|
-
descriptor.value = value;
|
|
118
|
+
function _classApplyDescriptorSet(e, t, l) {
|
|
119
|
+
if (t.set) t.set.call(e, l);else {
|
|
120
|
+
if (!t.writable) throw new TypeError("attempted to set read only private field");
|
|
121
|
+
t.value = l;
|
|
145
122
|
}
|
|
146
123
|
}
|
|
147
124
|
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
return privateMap.get(receiver);
|
|
125
|
+
function _assertClassBrand(e, t, n) {
|
|
126
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
127
|
+
throw new TypeError("Private element is not present on this object");
|
|
153
128
|
}
|
|
154
129
|
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
_classApplyDescriptorSet(receiver, descriptor, value);
|
|
158
|
-
return value;
|
|
130
|
+
function _classPrivateFieldGet2(s, a) {
|
|
131
|
+
return s.get(_assertClassBrand(s, a));
|
|
159
132
|
}
|
|
160
133
|
|
|
161
|
-
function
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
return descriptor.value;
|
|
134
|
+
function _classPrivateFieldSet(e, t, r) {
|
|
135
|
+
var s = _classPrivateFieldGet2(t, e);
|
|
136
|
+
return _classApplyDescriptorSet(e, s, r), r;
|
|
166
137
|
}
|
|
167
138
|
|
|
168
|
-
function
|
|
169
|
-
|
|
170
|
-
|
|
139
|
+
function _classApplyDescriptorGet(e, t) {
|
|
140
|
+
return t.get ? t.get.call(e) : t.value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function _classPrivateFieldGet(e, t) {
|
|
144
|
+
var r = _classPrivateFieldGet2(t, e);
|
|
145
|
+
return _classApplyDescriptorGet(e, r);
|
|
171
146
|
}
|
|
172
147
|
|
|
173
148
|
function getDefaultExportFromCjs (x) {
|
|
@@ -179,14 +154,14 @@ var regeneratorRuntime$1 = {exports: {}};
|
|
|
179
154
|
var _typeof = {exports: {}};
|
|
180
155
|
|
|
181
156
|
(function (module) {
|
|
182
|
-
function _typeof(
|
|
157
|
+
function _typeof(o) {
|
|
183
158
|
"@babel/helpers - typeof";
|
|
184
159
|
|
|
185
|
-
return
|
|
186
|
-
return typeof
|
|
187
|
-
} : function (
|
|
188
|
-
return
|
|
189
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports
|
|
160
|
+
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
161
|
+
return typeof o;
|
|
162
|
+
} : function (o) {
|
|
163
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
164
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
|
|
190
165
|
}
|
|
191
166
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
192
167
|
} (_typeof));
|
|
@@ -197,304 +172,304 @@ var _typeofExports = _typeof.exports;
|
|
|
197
172
|
var _typeof = _typeofExports["default"];
|
|
198
173
|
function _regeneratorRuntime() {
|
|
199
174
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
200
|
-
return
|
|
175
|
+
return e;
|
|
201
176
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
202
|
-
var
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
177
|
+
var t,
|
|
178
|
+
e = {},
|
|
179
|
+
r = Object.prototype,
|
|
180
|
+
n = r.hasOwnProperty,
|
|
181
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
182
|
+
t[e] = r.value;
|
|
207
183
|
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
function define(
|
|
213
|
-
return Object.defineProperty(
|
|
214
|
-
value:
|
|
184
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
185
|
+
a = i.iterator || "@@iterator",
|
|
186
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
187
|
+
u = i.toStringTag || "@@toStringTag";
|
|
188
|
+
function define(t, e, r) {
|
|
189
|
+
return Object.defineProperty(t, e, {
|
|
190
|
+
value: r,
|
|
215
191
|
enumerable: !0,
|
|
216
192
|
configurable: !0,
|
|
217
193
|
writable: !0
|
|
218
|
-
}),
|
|
194
|
+
}), t[e];
|
|
219
195
|
}
|
|
220
196
|
try {
|
|
221
197
|
define({}, "");
|
|
222
|
-
} catch (
|
|
223
|
-
define = function define(
|
|
224
|
-
return
|
|
198
|
+
} catch (t) {
|
|
199
|
+
define = function define(t, e, r) {
|
|
200
|
+
return t[e] = r;
|
|
225
201
|
};
|
|
226
202
|
}
|
|
227
|
-
function wrap(
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return
|
|
232
|
-
value: makeInvokeMethod(
|
|
233
|
-
}),
|
|
203
|
+
function wrap(t, e, r, n) {
|
|
204
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
205
|
+
a = Object.create(i.prototype),
|
|
206
|
+
c = new Context(n || []);
|
|
207
|
+
return o(a, "_invoke", {
|
|
208
|
+
value: makeInvokeMethod(t, r, c)
|
|
209
|
+
}), a;
|
|
234
210
|
}
|
|
235
|
-
function tryCatch(
|
|
211
|
+
function tryCatch(t, e, r) {
|
|
236
212
|
try {
|
|
237
213
|
return {
|
|
238
214
|
type: "normal",
|
|
239
|
-
arg:
|
|
215
|
+
arg: t.call(e, r)
|
|
240
216
|
};
|
|
241
|
-
} catch (
|
|
217
|
+
} catch (t) {
|
|
242
218
|
return {
|
|
243
219
|
type: "throw",
|
|
244
|
-
arg:
|
|
220
|
+
arg: t
|
|
245
221
|
};
|
|
246
222
|
}
|
|
247
223
|
}
|
|
248
|
-
|
|
249
|
-
var
|
|
224
|
+
e.wrap = wrap;
|
|
225
|
+
var h = "suspendedStart",
|
|
226
|
+
l = "suspendedYield",
|
|
227
|
+
f = "executing",
|
|
228
|
+
s = "completed",
|
|
229
|
+
y = {};
|
|
250
230
|
function Generator() {}
|
|
251
231
|
function GeneratorFunction() {}
|
|
252
232
|
function GeneratorFunctionPrototype() {}
|
|
253
|
-
var
|
|
254
|
-
define(
|
|
233
|
+
var p = {};
|
|
234
|
+
define(p, a, function () {
|
|
255
235
|
return this;
|
|
256
236
|
});
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
function defineIteratorMethods(
|
|
262
|
-
["next", "throw", "return"].forEach(function (
|
|
263
|
-
define(
|
|
264
|
-
return this._invoke(
|
|
237
|
+
var d = Object.getPrototypeOf,
|
|
238
|
+
v = d && d(d(values([])));
|
|
239
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
240
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
241
|
+
function defineIteratorMethods(t) {
|
|
242
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
243
|
+
define(t, e, function (t) {
|
|
244
|
+
return this._invoke(e, t);
|
|
265
245
|
});
|
|
266
246
|
});
|
|
267
247
|
}
|
|
268
|
-
function AsyncIterator(
|
|
269
|
-
function invoke(
|
|
270
|
-
var
|
|
271
|
-
if ("throw" !==
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
return
|
|
275
|
-
invoke("next",
|
|
276
|
-
}, function (
|
|
277
|
-
invoke("throw",
|
|
278
|
-
}) :
|
|
279
|
-
|
|
280
|
-
}, function (
|
|
281
|
-
return invoke("throw",
|
|
248
|
+
function AsyncIterator(t, e) {
|
|
249
|
+
function invoke(r, o, i, a) {
|
|
250
|
+
var c = tryCatch(t[r], t, o);
|
|
251
|
+
if ("throw" !== c.type) {
|
|
252
|
+
var u = c.arg,
|
|
253
|
+
h = u.value;
|
|
254
|
+
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
255
|
+
invoke("next", t, i, a);
|
|
256
|
+
}, function (t) {
|
|
257
|
+
invoke("throw", t, i, a);
|
|
258
|
+
}) : e.resolve(h).then(function (t) {
|
|
259
|
+
u.value = t, i(u);
|
|
260
|
+
}, function (t) {
|
|
261
|
+
return invoke("throw", t, i, a);
|
|
282
262
|
});
|
|
283
263
|
}
|
|
284
|
-
|
|
264
|
+
a(c.arg);
|
|
285
265
|
}
|
|
286
|
-
var
|
|
287
|
-
|
|
288
|
-
value: function value(
|
|
266
|
+
var r;
|
|
267
|
+
o(this, "_invoke", {
|
|
268
|
+
value: function value(t, n) {
|
|
289
269
|
function callInvokeWithMethodAndArg() {
|
|
290
|
-
return new
|
|
291
|
-
invoke(
|
|
270
|
+
return new e(function (e, r) {
|
|
271
|
+
invoke(t, n, e, r);
|
|
292
272
|
});
|
|
293
273
|
}
|
|
294
|
-
return
|
|
274
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
295
275
|
}
|
|
296
276
|
});
|
|
297
277
|
}
|
|
298
|
-
function makeInvokeMethod(
|
|
299
|
-
var
|
|
300
|
-
return function (
|
|
301
|
-
if (
|
|
302
|
-
if (
|
|
303
|
-
if ("throw" ===
|
|
304
|
-
return
|
|
278
|
+
function makeInvokeMethod(e, r, n) {
|
|
279
|
+
var o = h;
|
|
280
|
+
return function (i, a) {
|
|
281
|
+
if (o === f) throw Error("Generator is already running");
|
|
282
|
+
if (o === s) {
|
|
283
|
+
if ("throw" === i) throw a;
|
|
284
|
+
return {
|
|
285
|
+
value: t,
|
|
286
|
+
done: !0
|
|
287
|
+
};
|
|
305
288
|
}
|
|
306
|
-
for (
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
var
|
|
310
|
-
if (
|
|
311
|
-
if (
|
|
312
|
-
return
|
|
289
|
+
for (n.method = i, n.arg = a;;) {
|
|
290
|
+
var c = n.delegate;
|
|
291
|
+
if (c) {
|
|
292
|
+
var u = maybeInvokeDelegate(c, n);
|
|
293
|
+
if (u) {
|
|
294
|
+
if (u === y) continue;
|
|
295
|
+
return u;
|
|
313
296
|
}
|
|
314
297
|
}
|
|
315
|
-
if ("next" ===
|
|
316
|
-
if (
|
|
317
|
-
|
|
318
|
-
} else "return" ===
|
|
319
|
-
|
|
320
|
-
var
|
|
321
|
-
if ("normal" ===
|
|
322
|
-
if (
|
|
298
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
299
|
+
if (o === h) throw o = s, n.arg;
|
|
300
|
+
n.dispatchException(n.arg);
|
|
301
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
302
|
+
o = f;
|
|
303
|
+
var p = tryCatch(e, r, n);
|
|
304
|
+
if ("normal" === p.type) {
|
|
305
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
323
306
|
return {
|
|
324
|
-
value:
|
|
325
|
-
done:
|
|
307
|
+
value: p.arg,
|
|
308
|
+
done: n.done
|
|
326
309
|
};
|
|
327
310
|
}
|
|
328
|
-
"throw" ===
|
|
311
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
329
312
|
}
|
|
330
313
|
};
|
|
331
314
|
}
|
|
332
|
-
function maybeInvokeDelegate(
|
|
333
|
-
var
|
|
334
|
-
|
|
335
|
-
if (
|
|
336
|
-
var
|
|
337
|
-
if ("throw" ===
|
|
338
|
-
var
|
|
339
|
-
return
|
|
315
|
+
function maybeInvokeDelegate(e, r) {
|
|
316
|
+
var n = r.method,
|
|
317
|
+
o = e.iterator[n];
|
|
318
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
319
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
320
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
321
|
+
var a = i.arg;
|
|
322
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
340
323
|
}
|
|
341
|
-
function pushTryEntry(
|
|
342
|
-
var
|
|
343
|
-
tryLoc:
|
|
324
|
+
function pushTryEntry(t) {
|
|
325
|
+
var e = {
|
|
326
|
+
tryLoc: t[0]
|
|
344
327
|
};
|
|
345
|
-
1 in
|
|
328
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
346
329
|
}
|
|
347
|
-
function resetTryEntry(
|
|
348
|
-
var
|
|
349
|
-
|
|
330
|
+
function resetTryEntry(t) {
|
|
331
|
+
var e = t.completion || {};
|
|
332
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
350
333
|
}
|
|
351
|
-
function Context(
|
|
334
|
+
function Context(t) {
|
|
352
335
|
this.tryEntries = [{
|
|
353
336
|
tryLoc: "root"
|
|
354
|
-
}],
|
|
337
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
355
338
|
}
|
|
356
|
-
function values(
|
|
357
|
-
if (
|
|
358
|
-
var
|
|
359
|
-
if (
|
|
360
|
-
if ("function" == typeof
|
|
361
|
-
if (!isNaN(
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
for (; ++
|
|
365
|
-
return next.value =
|
|
339
|
+
function values(e) {
|
|
340
|
+
if (e || "" === e) {
|
|
341
|
+
var r = e[a];
|
|
342
|
+
if (r) return r.call(e);
|
|
343
|
+
if ("function" == typeof e.next) return e;
|
|
344
|
+
if (!isNaN(e.length)) {
|
|
345
|
+
var o = -1,
|
|
346
|
+
i = function next() {
|
|
347
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
348
|
+
return next.value = t, next.done = !0, next;
|
|
366
349
|
};
|
|
367
|
-
return
|
|
350
|
+
return i.next = i;
|
|
368
351
|
}
|
|
369
352
|
}
|
|
370
|
-
|
|
371
|
-
next: doneResult
|
|
372
|
-
};
|
|
353
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
373
354
|
}
|
|
374
|
-
|
|
375
|
-
return {
|
|
376
|
-
value: undefined,
|
|
377
|
-
done: !0
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
355
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
381
356
|
value: GeneratorFunctionPrototype,
|
|
382
357
|
configurable: !0
|
|
383
|
-
}),
|
|
358
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
384
359
|
value: GeneratorFunction,
|
|
385
360
|
configurable: !0
|
|
386
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
387
|
-
var
|
|
388
|
-
return !!
|
|
389
|
-
},
|
|
390
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
391
|
-
},
|
|
361
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
362
|
+
var e = "function" == typeof t && t.constructor;
|
|
363
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
364
|
+
}, e.mark = function (t) {
|
|
365
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
366
|
+
}, e.awrap = function (t) {
|
|
392
367
|
return {
|
|
393
|
-
__await:
|
|
368
|
+
__await: t
|
|
394
369
|
};
|
|
395
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
370
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
396
371
|
return this;
|
|
397
|
-
}),
|
|
398
|
-
void 0 ===
|
|
399
|
-
var
|
|
400
|
-
return
|
|
401
|
-
return
|
|
372
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
373
|
+
void 0 === i && (i = Promise);
|
|
374
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
375
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
376
|
+
return t.done ? t.value : a.next();
|
|
402
377
|
});
|
|
403
|
-
}, defineIteratorMethods(
|
|
378
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
404
379
|
return this;
|
|
405
|
-
}), define(
|
|
380
|
+
}), define(g, "toString", function () {
|
|
406
381
|
return "[object Generator]";
|
|
407
|
-
}),
|
|
408
|
-
var
|
|
409
|
-
|
|
410
|
-
for (var
|
|
411
|
-
return
|
|
412
|
-
for (;
|
|
413
|
-
var
|
|
414
|
-
if (
|
|
382
|
+
}), e.keys = function (t) {
|
|
383
|
+
var e = Object(t),
|
|
384
|
+
r = [];
|
|
385
|
+
for (var n in e) r.push(n);
|
|
386
|
+
return r.reverse(), function next() {
|
|
387
|
+
for (; r.length;) {
|
|
388
|
+
var t = r.pop();
|
|
389
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
415
390
|
}
|
|
416
391
|
return next.done = !0, next;
|
|
417
392
|
};
|
|
418
|
-
},
|
|
393
|
+
}, e.values = values, Context.prototype = {
|
|
419
394
|
constructor: Context,
|
|
420
|
-
reset: function reset(
|
|
421
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
395
|
+
reset: function reset(e) {
|
|
396
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
422
397
|
},
|
|
423
398
|
stop: function stop() {
|
|
424
399
|
this.done = !0;
|
|
425
|
-
var
|
|
426
|
-
if ("throw" ===
|
|
400
|
+
var t = this.tryEntries[0].completion;
|
|
401
|
+
if ("throw" === t.type) throw t.arg;
|
|
427
402
|
return this.rval;
|
|
428
403
|
},
|
|
429
|
-
dispatchException: function dispatchException(
|
|
430
|
-
if (this.done) throw
|
|
431
|
-
var
|
|
432
|
-
function handle(
|
|
433
|
-
return
|
|
404
|
+
dispatchException: function dispatchException(e) {
|
|
405
|
+
if (this.done) throw e;
|
|
406
|
+
var r = this;
|
|
407
|
+
function handle(n, o) {
|
|
408
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
434
409
|
}
|
|
435
|
-
for (var
|
|
436
|
-
var
|
|
437
|
-
|
|
438
|
-
if ("root" ===
|
|
439
|
-
if (
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
if (
|
|
443
|
-
if (this.prev <
|
|
444
|
-
if (this.prev <
|
|
445
|
-
} else if (
|
|
446
|
-
if (this.prev <
|
|
410
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
411
|
+
var i = this.tryEntries[o],
|
|
412
|
+
a = i.completion;
|
|
413
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
414
|
+
if (i.tryLoc <= this.prev) {
|
|
415
|
+
var c = n.call(i, "catchLoc"),
|
|
416
|
+
u = n.call(i, "finallyLoc");
|
|
417
|
+
if (c && u) {
|
|
418
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
419
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
420
|
+
} else if (c) {
|
|
421
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
447
422
|
} else {
|
|
448
|
-
if (!
|
|
449
|
-
if (this.prev <
|
|
423
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
424
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
450
425
|
}
|
|
451
426
|
}
|
|
452
427
|
}
|
|
453
428
|
},
|
|
454
|
-
abrupt: function abrupt(
|
|
455
|
-
for (var
|
|
456
|
-
var
|
|
457
|
-
if (
|
|
458
|
-
var
|
|
429
|
+
abrupt: function abrupt(t, e) {
|
|
430
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
431
|
+
var o = this.tryEntries[r];
|
|
432
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
433
|
+
var i = o;
|
|
459
434
|
break;
|
|
460
435
|
}
|
|
461
436
|
}
|
|
462
|
-
|
|
463
|
-
var
|
|
464
|
-
return
|
|
437
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
438
|
+
var a = i ? i.completion : {};
|
|
439
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
465
440
|
},
|
|
466
|
-
complete: function complete(
|
|
467
|
-
if ("throw" ===
|
|
468
|
-
return "break" ===
|
|
441
|
+
complete: function complete(t, e) {
|
|
442
|
+
if ("throw" === t.type) throw t.arg;
|
|
443
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
469
444
|
},
|
|
470
|
-
finish: function finish(
|
|
471
|
-
for (var
|
|
472
|
-
var
|
|
473
|
-
if (
|
|
445
|
+
finish: function finish(t) {
|
|
446
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
447
|
+
var r = this.tryEntries[e];
|
|
448
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
474
449
|
}
|
|
475
450
|
},
|
|
476
|
-
"catch": function _catch(
|
|
477
|
-
for (var
|
|
478
|
-
var
|
|
479
|
-
if (
|
|
480
|
-
var
|
|
481
|
-
if ("throw" ===
|
|
482
|
-
var
|
|
483
|
-
resetTryEntry(
|
|
451
|
+
"catch": function _catch(t) {
|
|
452
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
453
|
+
var r = this.tryEntries[e];
|
|
454
|
+
if (r.tryLoc === t) {
|
|
455
|
+
var n = r.completion;
|
|
456
|
+
if ("throw" === n.type) {
|
|
457
|
+
var o = n.arg;
|
|
458
|
+
resetTryEntry(r);
|
|
484
459
|
}
|
|
485
|
-
return
|
|
460
|
+
return o;
|
|
486
461
|
}
|
|
487
462
|
}
|
|
488
|
-
throw
|
|
463
|
+
throw Error("illegal catch attempt");
|
|
489
464
|
},
|
|
490
|
-
delegateYield: function delegateYield(
|
|
465
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
491
466
|
return this.delegate = {
|
|
492
|
-
iterator: values(
|
|
493
|
-
resultName:
|
|
494
|
-
nextLoc:
|
|
495
|
-
}, "next" === this.method && (this.arg =
|
|
467
|
+
iterator: values(e),
|
|
468
|
+
resultName: r,
|
|
469
|
+
nextLoc: n
|
|
470
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
496
471
|
}
|
|
497
|
-
},
|
|
472
|
+
}, e;
|
|
498
473
|
}
|
|
499
474
|
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
500
475
|
} (regeneratorRuntime$1));
|
|
@@ -572,111 +547,88 @@ function v4(options, buf, offset) {
|
|
|
572
547
|
return unsafeStringify(rnds);
|
|
573
548
|
}
|
|
574
549
|
|
|
575
|
-
function _setPrototypeOf(
|
|
576
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
};
|
|
580
|
-
return _setPrototypeOf(o, p);
|
|
550
|
+
function _setPrototypeOf(t, e) {
|
|
551
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
552
|
+
return t.__proto__ = e, t;
|
|
553
|
+
}, _setPrototypeOf(t, e);
|
|
581
554
|
}
|
|
582
555
|
|
|
583
|
-
function _inherits(
|
|
584
|
-
if (typeof
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
556
|
+
function _inherits(t, e) {
|
|
557
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
558
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
588
559
|
constructor: {
|
|
589
|
-
value:
|
|
590
|
-
writable:
|
|
591
|
-
configurable:
|
|
560
|
+
value: t,
|
|
561
|
+
writable: !0,
|
|
562
|
+
configurable: !0
|
|
592
563
|
}
|
|
593
|
-
})
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
});
|
|
597
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
564
|
+
}), Object.defineProperty(t, "prototype", {
|
|
565
|
+
writable: !1
|
|
566
|
+
}), e && _setPrototypeOf(t, e);
|
|
598
567
|
}
|
|
599
568
|
|
|
600
|
-
function _assertThisInitialized(
|
|
601
|
-
if (
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
return self;
|
|
569
|
+
function _assertThisInitialized(e) {
|
|
570
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
571
|
+
return e;
|
|
605
572
|
}
|
|
606
573
|
|
|
607
|
-
function _possibleConstructorReturn(
|
|
608
|
-
if (
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
612
|
-
}
|
|
613
|
-
return _assertThisInitialized(self);
|
|
574
|
+
function _possibleConstructorReturn(t, e) {
|
|
575
|
+
if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
|
|
576
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
577
|
+
return _assertThisInitialized(t);
|
|
614
578
|
}
|
|
615
579
|
|
|
616
|
-
function _getPrototypeOf(
|
|
617
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
618
|
-
return
|
|
619
|
-
};
|
|
620
|
-
return _getPrototypeOf(o);
|
|
580
|
+
function _getPrototypeOf(t) {
|
|
581
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
582
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
583
|
+
}, _getPrototypeOf(t);
|
|
621
584
|
}
|
|
622
585
|
|
|
623
|
-
function _isNativeFunction(
|
|
624
|
-
|
|
586
|
+
function _isNativeFunction(t) {
|
|
587
|
+
try {
|
|
588
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
589
|
+
} catch (n) {
|
|
590
|
+
return "function" == typeof t;
|
|
591
|
+
}
|
|
625
592
|
}
|
|
626
593
|
|
|
627
594
|
function _isNativeReflectConstruct$1() {
|
|
628
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
629
|
-
if (Reflect.construct.sham) return false;
|
|
630
|
-
if (typeof Proxy === "function") return true;
|
|
631
595
|
try {
|
|
632
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return
|
|
636
|
-
}
|
|
596
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
597
|
+
} catch (t) {}
|
|
598
|
+
return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() {
|
|
599
|
+
return !!t;
|
|
600
|
+
})();
|
|
637
601
|
}
|
|
638
602
|
|
|
639
|
-
function _construct(
|
|
640
|
-
if (_isNativeReflectConstruct$1())
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
a.push.apply(a, args);
|
|
646
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
647
|
-
var instance = new Constructor();
|
|
648
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
649
|
-
return instance;
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
return _construct.apply(null, arguments);
|
|
603
|
+
function _construct(t, e, r) {
|
|
604
|
+
if (_isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments);
|
|
605
|
+
var o = [null];
|
|
606
|
+
o.push.apply(o, e);
|
|
607
|
+
var p = new (t.bind.apply(t, o))();
|
|
608
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
|
653
609
|
}
|
|
654
610
|
|
|
655
|
-
function _wrapNativeSuper(
|
|
656
|
-
var
|
|
657
|
-
_wrapNativeSuper = function _wrapNativeSuper(
|
|
658
|
-
if (
|
|
659
|
-
if (typeof
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
664
|
-
_cache.set(Class, Wrapper);
|
|
611
|
+
function _wrapNativeSuper(t) {
|
|
612
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
613
|
+
return _wrapNativeSuper = function _wrapNativeSuper(t) {
|
|
614
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
615
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
616
|
+
if (void 0 !== r) {
|
|
617
|
+
if (r.has(t)) return r.get(t);
|
|
618
|
+
r.set(t, Wrapper);
|
|
665
619
|
}
|
|
666
620
|
function Wrapper() {
|
|
667
|
-
return _construct(
|
|
621
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
668
622
|
}
|
|
669
|
-
Wrapper.prototype = Object.create(
|
|
623
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
670
624
|
constructor: {
|
|
671
625
|
value: Wrapper,
|
|
672
|
-
enumerable:
|
|
673
|
-
writable:
|
|
674
|
-
configurable:
|
|
626
|
+
enumerable: !1,
|
|
627
|
+
writable: !0,
|
|
628
|
+
configurable: !0
|
|
675
629
|
}
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
};
|
|
679
|
-
return _wrapNativeSuper(Class);
|
|
630
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
631
|
+
}, _wrapNativeSuper(t);
|
|
680
632
|
}
|
|
681
633
|
|
|
682
634
|
var TOTAL_RETRIES = 15;
|
|
@@ -687,11 +639,6 @@ var DEFAULT_RETRY_CONFIG = {
|
|
|
687
639
|
retryDelay: INITIAL_RETRY_DELAY,
|
|
688
640
|
retryableStatuses: []
|
|
689
641
|
};
|
|
690
|
-
|
|
691
|
-
// No need to localize this since it will only be used in the code
|
|
692
|
-
// eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized
|
|
693
|
-
var NETWORK_ERROR = "Network Error";
|
|
694
|
-
var TIMEOUT_ERROR = "ECONNABORTED";
|
|
695
642
|
var HAS_CHROME_NAMESPACE = (typeof chrome === "undefined" ? "undefined" : _typeof$1(chrome)) === "object";
|
|
696
643
|
HAS_CHROME_NAMESPACE && isNotNil(chrome.extension);
|
|
697
644
|
platform.name === "Safari";
|
|
@@ -707,8 +654,8 @@ var sleep = function sleep(delay) {
|
|
|
707
654
|
});
|
|
708
655
|
};
|
|
709
656
|
|
|
710
|
-
function _createSuper(
|
|
711
|
-
function _isNativeReflectConstruct() {
|
|
657
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
658
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
712
659
|
var RetryError = /*#__PURE__*/function (_Error) {
|
|
713
660
|
_inherits(RetryError, _Error);
|
|
714
661
|
var _super = _createSuper(RetryError);
|
|
@@ -723,12 +670,11 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
|
|
|
723
670
|
_ref$retries = _ref.retries,
|
|
724
671
|
retries = _ref$retries === void 0 ? TOTAL_RETRIES : _ref$retries,
|
|
725
672
|
_ref$retryDelay = _ref.retryDelay,
|
|
726
|
-
retryDelay = _ref$retryDelay === void 0 ? INITIAL_RETRY_DELAY : _ref$retryDelay
|
|
727
|
-
retryableStatuses = _ref.retryableStatuses;
|
|
673
|
+
retryDelay = _ref$retryDelay === void 0 ? INITIAL_RETRY_DELAY : _ref$retryDelay;
|
|
728
674
|
return /*#__PURE__*/function () {
|
|
729
675
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(apiConnectorArgs) {
|
|
730
676
|
var _config$signal;
|
|
731
|
-
var _apiConnectorArgs$con, config, remainingAttempts, shouldCancelRetries, _error$config, _error$response,
|
|
677
|
+
var _apiConnectorArgs$con, config, remainingAttempts, shouldCancelRetries, _error$config, _error$response, _error$response2;
|
|
732
678
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
733
679
|
while (1) switch (_context.prev = _context.next) {
|
|
734
680
|
case 0:
|
|
@@ -740,7 +686,7 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
|
|
|
740
686
|
});
|
|
741
687
|
case 4:
|
|
742
688
|
if (!(remainingAttempts-- && !shouldCancelRetries)) {
|
|
743
|
-
_context.next =
|
|
689
|
+
_context.next = 24;
|
|
744
690
|
break;
|
|
745
691
|
}
|
|
746
692
|
_context.prev = 5;
|
|
@@ -751,28 +697,26 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
|
|
|
751
697
|
case 11:
|
|
752
698
|
_context.prev = 11;
|
|
753
699
|
_context.t0 = _context["catch"](5);
|
|
754
|
-
logger.error("buildRetryableApi -> Failed to connect, remainingAttempts:", _context.t0 === null || _context.t0 === void 0 ? void 0 : (_error$config = _context.t0.config) === null || _error$config === void 0 ? void 0 : _error$config.url, remainingAttempts);
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
if (!(isRetryableError && remainingAttempts > 0)) {
|
|
758
|
-
_context.next = 23;
|
|
700
|
+
logger.error("buildRetryableApi -> Failed to connect, remainingAttempts:", _context.t0 === null || _context.t0 === void 0 ? void 0 : (_error$config = _context.t0.config) === null || _error$config === void 0 ? void 0 : _error$config.url, (_error$response = _context.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.status, remainingAttempts);
|
|
701
|
+
if (!(((_error$response2 = _context.t0.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) !== 401 && remainingAttempts > 0)) {
|
|
702
|
+
_context.next = 21;
|
|
759
703
|
break;
|
|
760
704
|
}
|
|
761
|
-
logger.info("buildRetryableApi -> Failed to connect
|
|
762
|
-
_context.next =
|
|
705
|
+
logger.info("buildRetryableApi -> Failed to connect -> retry in:", retryDelay);
|
|
706
|
+
_context.next = 18;
|
|
763
707
|
return sleep(retryDelay);
|
|
764
|
-
case
|
|
708
|
+
case 18:
|
|
765
709
|
retryDelay = min(retryDelay * 2, MAX_RETRY_DELAY);
|
|
766
|
-
_context.next =
|
|
710
|
+
_context.next = 22;
|
|
767
711
|
break;
|
|
768
|
-
case
|
|
712
|
+
case 21:
|
|
769
713
|
throw _context.t0;
|
|
770
|
-
case
|
|
714
|
+
case 22:
|
|
771
715
|
_context.next = 4;
|
|
772
716
|
break;
|
|
773
|
-
case
|
|
717
|
+
case 24:
|
|
774
718
|
throw new RetryError("Request cancelled or request retries exhausted");
|
|
775
|
-
case
|
|
719
|
+
case 25:
|
|
776
720
|
case "end":
|
|
777
721
|
return _context.stop();
|
|
778
722
|
}
|
|
@@ -906,9 +850,7 @@ var presignedUpload = function presignedUpload(_ref) {
|
|
|
906
850
|
config = _ref.config;
|
|
907
851
|
return s3AxiosInstance.put(presignedUrl, blob, config);
|
|
908
852
|
};
|
|
909
|
-
var retryablePresignedUpload = buildRetryableApi(presignedUpload
|
|
910
|
-
retryableStatuses: RETRYABLE_ERRORS
|
|
911
|
-
});
|
|
853
|
+
var retryablePresignedUpload = buildRetryableApi(presignedUpload);
|
|
912
854
|
var s3Api = {
|
|
913
855
|
presignedUpload: retryablePresignedUpload
|
|
914
856
|
};
|
|
@@ -968,10 +910,10 @@ var calculateUploadProgress = function calculateUploadProgress(uploadProgress) {
|
|
|
968
910
|
return Math.round(uploaded * 100 / total);
|
|
969
911
|
};
|
|
970
912
|
|
|
971
|
-
function ownKeys$2(
|
|
972
|
-
function _objectSpread$2(
|
|
973
|
-
function _classPrivateFieldInitSpec$1(
|
|
974
|
-
function _checkPrivateRedeclaration$1(
|
|
913
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
914
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
915
|
+
function _classPrivateFieldInitSpec$1(e, t, a) { _checkPrivateRedeclaration$1(e, t), t.set(e, a); }
|
|
916
|
+
function _checkPrivateRedeclaration$1(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
975
917
|
var _recordingId = /*#__PURE__*/new WeakMap();
|
|
976
918
|
var _uploadId = /*#__PURE__*/new WeakMap();
|
|
977
919
|
var _unUploadedChunks = /*#__PURE__*/new WeakMap();
|
|
@@ -1457,32 +1399,32 @@ var getMultipartS3Uploader = function getMultipartS3Uploader() {
|
|
|
1457
1399
|
return multipartS3Uploader;
|
|
1458
1400
|
};
|
|
1459
1401
|
|
|
1460
|
-
function _arrayWithHoles(
|
|
1461
|
-
if (Array.isArray(
|
|
1402
|
+
function _arrayWithHoles(r) {
|
|
1403
|
+
if (Array.isArray(r)) return r;
|
|
1462
1404
|
}
|
|
1463
1405
|
|
|
1464
|
-
function _iterableToArrayLimit(
|
|
1465
|
-
var
|
|
1466
|
-
if (null !=
|
|
1467
|
-
var
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1406
|
+
function _iterableToArrayLimit(r, l) {
|
|
1407
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1408
|
+
if (null != t) {
|
|
1409
|
+
var e,
|
|
1410
|
+
n,
|
|
1411
|
+
i,
|
|
1412
|
+
u,
|
|
1413
|
+
a = [],
|
|
1414
|
+
f = !0,
|
|
1415
|
+
o = !1;
|
|
1474
1416
|
try {
|
|
1475
|
-
if (
|
|
1476
|
-
} catch (
|
|
1477
|
-
|
|
1417
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
1418
|
+
} catch (r) {
|
|
1419
|
+
o = !0, n = r;
|
|
1478
1420
|
} finally {
|
|
1479
1421
|
try {
|
|
1480
|
-
if (!
|
|
1422
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1481
1423
|
} finally {
|
|
1482
|
-
if (
|
|
1424
|
+
if (o) throw n;
|
|
1483
1425
|
}
|
|
1484
1426
|
}
|
|
1485
|
-
return
|
|
1427
|
+
return a;
|
|
1486
1428
|
}
|
|
1487
1429
|
}
|
|
1488
1430
|
|
|
@@ -1490,8 +1432,8 @@ function _nonIterableRest() {
|
|
|
1490
1432
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1491
1433
|
}
|
|
1492
1434
|
|
|
1493
|
-
function _slicedToArray(
|
|
1494
|
-
return _arrayWithHoles(
|
|
1435
|
+
function _slicedToArray(r, e) {
|
|
1436
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
1495
1437
|
}
|
|
1496
1438
|
|
|
1497
1439
|
// https://www.w3.org/TR/screen-capture/#displaycapturesurfacetype
|
|
@@ -1501,8 +1443,8 @@ var DISPLAY_SURFACE = {
|
|
|
1501
1443
|
browser: "browser"
|
|
1502
1444
|
};
|
|
1503
1445
|
|
|
1504
|
-
function ownKeys$1(
|
|
1505
|
-
function _objectSpread$1(
|
|
1446
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1447
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1506
1448
|
var initialState = {
|
|
1507
1449
|
status: SCREEN_RECORDER_STATUS.idle,
|
|
1508
1450
|
error: "",
|
|
@@ -1520,10 +1462,10 @@ var prepareStore = function prepareStore() {
|
|
|
1520
1462
|
}));
|
|
1521
1463
|
};
|
|
1522
1464
|
|
|
1523
|
-
function ownKeys(
|
|
1524
|
-
function _objectSpread(
|
|
1525
|
-
function _classPrivateFieldInitSpec(
|
|
1526
|
-
function _checkPrivateRedeclaration(
|
|
1465
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1466
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1467
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
1468
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
1527
1469
|
var _audio = /*#__PURE__*/new WeakMap();
|
|
1528
1470
|
var _video = /*#__PURE__*/new WeakMap();
|
|
1529
1471
|
var _videoStream = /*#__PURE__*/new WeakMap();
|