audible-api-ts 0.1.0 → 0.2.0
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/README.md +79 -22
- package/dist/catalog.d.ts +17 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.int.test.d.ts +2 -0
- package/dist/catalog.int.test.d.ts.map +1 -0
- package/dist/categories.d.ts +12 -0
- package/dist/categories.d.ts.map +1 -0
- package/dist/client.d.ts +5 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.int.test.d.ts +2 -0
- package/dist/client.int.test.d.ts.map +1 -0
- package/dist/client.unit.test.d.ts +2 -0
- package/dist/client.unit.test.d.ts.map +1 -0
- package/dist/credentials.d.ts +9 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/fetch.d.ts +22 -0
- package/dist/fetch.d.ts.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1903 -79
- package/dist/library.d.ts +9 -6
- package/dist/library.d.ts.map +1 -1
- package/dist/library.int.test.d.ts +2 -0
- package/dist/library.int.test.d.ts.map +1 -0
- package/dist/locales.unit.test.d.ts +2 -0
- package/dist/locales.unit.test.d.ts.map +1 -0
- package/dist/schemas.d.ts +581 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.unit.test.d.ts +2 -0
- package/dist/schemas.unit.test.d.ts.map +1 -0
- package/dist/types.d.ts +77 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.unit.test.d.ts +2 -0
- package/dist/utils.unit.test.d.ts.map +1 -0
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,1687 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __returnValue = (v) => v;
|
|
3
|
+
function __exportSetter(name, newValue) {
|
|
4
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
+
}
|
|
2
6
|
var __export = (target, all) => {
|
|
3
7
|
for (var name in all)
|
|
4
8
|
__defProp(target, name, {
|
|
5
9
|
get: all[name],
|
|
6
10
|
enumerable: true,
|
|
7
11
|
configurable: true,
|
|
8
|
-
set: (
|
|
12
|
+
set: __exportSetter.bind(all, name)
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
// node_modules/lodash-es/_arrayMap.js
|
|
16
|
+
function arrayMap(array, iteratee) {
|
|
17
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
18
|
+
while (++index < length) {
|
|
19
|
+
result[index] = iteratee(array[index], index, array);
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
var _arrayMap_default = arrayMap;
|
|
24
|
+
|
|
25
|
+
// node_modules/lodash-es/isArray.js
|
|
26
|
+
var isArray = Array.isArray;
|
|
27
|
+
var isArray_default = isArray;
|
|
28
|
+
|
|
29
|
+
// node_modules/lodash-es/_freeGlobal.js
|
|
30
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
31
|
+
var _freeGlobal_default = freeGlobal;
|
|
32
|
+
|
|
33
|
+
// node_modules/lodash-es/_root.js
|
|
34
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
35
|
+
var root = _freeGlobal_default || freeSelf || Function("return this")();
|
|
36
|
+
var _root_default = root;
|
|
37
|
+
|
|
38
|
+
// node_modules/lodash-es/_Symbol.js
|
|
39
|
+
var Symbol2 = _root_default.Symbol;
|
|
40
|
+
var _Symbol_default = Symbol2;
|
|
41
|
+
|
|
42
|
+
// node_modules/lodash-es/_getRawTag.js
|
|
43
|
+
var objectProto = Object.prototype;
|
|
44
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
45
|
+
var nativeObjectToString = objectProto.toString;
|
|
46
|
+
var symToStringTag = _Symbol_default ? _Symbol_default.toStringTag : undefined;
|
|
47
|
+
function getRawTag(value) {
|
|
48
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
49
|
+
try {
|
|
50
|
+
value[symToStringTag] = undefined;
|
|
51
|
+
var unmasked = true;
|
|
52
|
+
} catch (e) {}
|
|
53
|
+
var result = nativeObjectToString.call(value);
|
|
54
|
+
if (unmasked) {
|
|
55
|
+
if (isOwn) {
|
|
56
|
+
value[symToStringTag] = tag;
|
|
57
|
+
} else {
|
|
58
|
+
delete value[symToStringTag];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
var _getRawTag_default = getRawTag;
|
|
64
|
+
|
|
65
|
+
// node_modules/lodash-es/_objectToString.js
|
|
66
|
+
var objectProto2 = Object.prototype;
|
|
67
|
+
var nativeObjectToString2 = objectProto2.toString;
|
|
68
|
+
function objectToString(value) {
|
|
69
|
+
return nativeObjectToString2.call(value);
|
|
70
|
+
}
|
|
71
|
+
var _objectToString_default = objectToString;
|
|
72
|
+
|
|
73
|
+
// node_modules/lodash-es/_baseGetTag.js
|
|
74
|
+
var nullTag = "[object Null]";
|
|
75
|
+
var undefinedTag = "[object Undefined]";
|
|
76
|
+
var symToStringTag2 = _Symbol_default ? _Symbol_default.toStringTag : undefined;
|
|
77
|
+
function baseGetTag(value) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
80
|
+
}
|
|
81
|
+
return symToStringTag2 && symToStringTag2 in Object(value) ? _getRawTag_default(value) : _objectToString_default(value);
|
|
82
|
+
}
|
|
83
|
+
var _baseGetTag_default = baseGetTag;
|
|
84
|
+
|
|
85
|
+
// node_modules/lodash-es/isObjectLike.js
|
|
86
|
+
function isObjectLike(value) {
|
|
87
|
+
return value != null && typeof value == "object";
|
|
88
|
+
}
|
|
89
|
+
var isObjectLike_default = isObjectLike;
|
|
90
|
+
|
|
91
|
+
// node_modules/lodash-es/isSymbol.js
|
|
92
|
+
var symbolTag = "[object Symbol]";
|
|
93
|
+
function isSymbol(value) {
|
|
94
|
+
return typeof value == "symbol" || isObjectLike_default(value) && _baseGetTag_default(value) == symbolTag;
|
|
95
|
+
}
|
|
96
|
+
var isSymbol_default = isSymbol;
|
|
97
|
+
|
|
98
|
+
// node_modules/lodash-es/_isKey.js
|
|
99
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
100
|
+
var reIsPlainProp = /^\w*$/;
|
|
101
|
+
function isKey(value, object) {
|
|
102
|
+
if (isArray_default(value)) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
var type = typeof value;
|
|
106
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
110
|
+
}
|
|
111
|
+
var _isKey_default = isKey;
|
|
112
|
+
|
|
113
|
+
// node_modules/lodash-es/isObject.js
|
|
114
|
+
function isObject(value) {
|
|
115
|
+
var type = typeof value;
|
|
116
|
+
return value != null && (type == "object" || type == "function");
|
|
117
|
+
}
|
|
118
|
+
var isObject_default = isObject;
|
|
119
|
+
|
|
120
|
+
// node_modules/lodash-es/isFunction.js
|
|
121
|
+
var asyncTag = "[object AsyncFunction]";
|
|
122
|
+
var funcTag = "[object Function]";
|
|
123
|
+
var genTag = "[object GeneratorFunction]";
|
|
124
|
+
var proxyTag = "[object Proxy]";
|
|
125
|
+
function isFunction(value) {
|
|
126
|
+
if (!isObject_default(value)) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
var tag = _baseGetTag_default(value);
|
|
130
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
131
|
+
}
|
|
132
|
+
var isFunction_default = isFunction;
|
|
133
|
+
|
|
134
|
+
// node_modules/lodash-es/_coreJsData.js
|
|
135
|
+
var coreJsData = _root_default["__core-js_shared__"];
|
|
136
|
+
var _coreJsData_default = coreJsData;
|
|
137
|
+
|
|
138
|
+
// node_modules/lodash-es/_isMasked.js
|
|
139
|
+
var maskSrcKey = function() {
|
|
140
|
+
var uid = /[^.]+$/.exec(_coreJsData_default && _coreJsData_default.keys && _coreJsData_default.keys.IE_PROTO || "");
|
|
141
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
142
|
+
}();
|
|
143
|
+
function isMasked(func) {
|
|
144
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
145
|
+
}
|
|
146
|
+
var _isMasked_default = isMasked;
|
|
147
|
+
|
|
148
|
+
// node_modules/lodash-es/_toSource.js
|
|
149
|
+
var funcProto = Function.prototype;
|
|
150
|
+
var funcToString = funcProto.toString;
|
|
151
|
+
function toSource(func) {
|
|
152
|
+
if (func != null) {
|
|
153
|
+
try {
|
|
154
|
+
return funcToString.call(func);
|
|
155
|
+
} catch (e) {}
|
|
156
|
+
try {
|
|
157
|
+
return func + "";
|
|
158
|
+
} catch (e) {}
|
|
159
|
+
}
|
|
160
|
+
return "";
|
|
161
|
+
}
|
|
162
|
+
var _toSource_default = toSource;
|
|
163
|
+
|
|
164
|
+
// node_modules/lodash-es/_baseIsNative.js
|
|
165
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
166
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
167
|
+
var funcProto2 = Function.prototype;
|
|
168
|
+
var objectProto3 = Object.prototype;
|
|
169
|
+
var funcToString2 = funcProto2.toString;
|
|
170
|
+
var hasOwnProperty2 = objectProto3.hasOwnProperty;
|
|
171
|
+
var reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
172
|
+
function baseIsNative(value) {
|
|
173
|
+
if (!isObject_default(value) || _isMasked_default(value)) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
|
|
177
|
+
return pattern.test(_toSource_default(value));
|
|
178
|
+
}
|
|
179
|
+
var _baseIsNative_default = baseIsNative;
|
|
180
|
+
|
|
181
|
+
// node_modules/lodash-es/_getValue.js
|
|
182
|
+
function getValue(object, key) {
|
|
183
|
+
return object == null ? undefined : object[key];
|
|
184
|
+
}
|
|
185
|
+
var _getValue_default = getValue;
|
|
186
|
+
|
|
187
|
+
// node_modules/lodash-es/_getNative.js
|
|
188
|
+
function getNative(object, key) {
|
|
189
|
+
var value = _getValue_default(object, key);
|
|
190
|
+
return _baseIsNative_default(value) ? value : undefined;
|
|
191
|
+
}
|
|
192
|
+
var _getNative_default = getNative;
|
|
193
|
+
|
|
194
|
+
// node_modules/lodash-es/_nativeCreate.js
|
|
195
|
+
var nativeCreate = _getNative_default(Object, "create");
|
|
196
|
+
var _nativeCreate_default = nativeCreate;
|
|
197
|
+
|
|
198
|
+
// node_modules/lodash-es/_hashClear.js
|
|
199
|
+
function hashClear() {
|
|
200
|
+
this.__data__ = _nativeCreate_default ? _nativeCreate_default(null) : {};
|
|
201
|
+
this.size = 0;
|
|
202
|
+
}
|
|
203
|
+
var _hashClear_default = hashClear;
|
|
204
|
+
|
|
205
|
+
// node_modules/lodash-es/_hashDelete.js
|
|
206
|
+
function hashDelete(key) {
|
|
207
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
208
|
+
this.size -= result ? 1 : 0;
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
var _hashDelete_default = hashDelete;
|
|
212
|
+
|
|
213
|
+
// node_modules/lodash-es/_hashGet.js
|
|
214
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
215
|
+
var objectProto4 = Object.prototype;
|
|
216
|
+
var hasOwnProperty3 = objectProto4.hasOwnProperty;
|
|
217
|
+
function hashGet(key) {
|
|
218
|
+
var data = this.__data__;
|
|
219
|
+
if (_nativeCreate_default) {
|
|
220
|
+
var result = data[key];
|
|
221
|
+
return result === HASH_UNDEFINED ? undefined : result;
|
|
222
|
+
}
|
|
223
|
+
return hasOwnProperty3.call(data, key) ? data[key] : undefined;
|
|
224
|
+
}
|
|
225
|
+
var _hashGet_default = hashGet;
|
|
226
|
+
|
|
227
|
+
// node_modules/lodash-es/_hashHas.js
|
|
228
|
+
var objectProto5 = Object.prototype;
|
|
229
|
+
var hasOwnProperty4 = objectProto5.hasOwnProperty;
|
|
230
|
+
function hashHas(key) {
|
|
231
|
+
var data = this.__data__;
|
|
232
|
+
return _nativeCreate_default ? data[key] !== undefined : hasOwnProperty4.call(data, key);
|
|
233
|
+
}
|
|
234
|
+
var _hashHas_default = hashHas;
|
|
235
|
+
|
|
236
|
+
// node_modules/lodash-es/_hashSet.js
|
|
237
|
+
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
|
|
238
|
+
function hashSet(key, value) {
|
|
239
|
+
var data = this.__data__;
|
|
240
|
+
this.size += this.has(key) ? 0 : 1;
|
|
241
|
+
data[key] = _nativeCreate_default && value === undefined ? HASH_UNDEFINED2 : value;
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
var _hashSet_default = hashSet;
|
|
245
|
+
|
|
246
|
+
// node_modules/lodash-es/_Hash.js
|
|
247
|
+
function Hash(entries) {
|
|
248
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
249
|
+
this.clear();
|
|
250
|
+
while (++index < length) {
|
|
251
|
+
var entry = entries[index];
|
|
252
|
+
this.set(entry[0], entry[1]);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
Hash.prototype.clear = _hashClear_default;
|
|
256
|
+
Hash.prototype["delete"] = _hashDelete_default;
|
|
257
|
+
Hash.prototype.get = _hashGet_default;
|
|
258
|
+
Hash.prototype.has = _hashHas_default;
|
|
259
|
+
Hash.prototype.set = _hashSet_default;
|
|
260
|
+
var _Hash_default = Hash;
|
|
261
|
+
|
|
262
|
+
// node_modules/lodash-es/_listCacheClear.js
|
|
263
|
+
function listCacheClear() {
|
|
264
|
+
this.__data__ = [];
|
|
265
|
+
this.size = 0;
|
|
266
|
+
}
|
|
267
|
+
var _listCacheClear_default = listCacheClear;
|
|
268
|
+
|
|
269
|
+
// node_modules/lodash-es/eq.js
|
|
270
|
+
function eq(value, other) {
|
|
271
|
+
return value === other || value !== value && other !== other;
|
|
272
|
+
}
|
|
273
|
+
var eq_default = eq;
|
|
274
|
+
|
|
275
|
+
// node_modules/lodash-es/_assocIndexOf.js
|
|
276
|
+
function assocIndexOf(array, key) {
|
|
277
|
+
var length = array.length;
|
|
278
|
+
while (length--) {
|
|
279
|
+
if (eq_default(array[length][0], key)) {
|
|
280
|
+
return length;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return -1;
|
|
284
|
+
}
|
|
285
|
+
var _assocIndexOf_default = assocIndexOf;
|
|
286
|
+
|
|
287
|
+
// node_modules/lodash-es/_listCacheDelete.js
|
|
288
|
+
var arrayProto = Array.prototype;
|
|
289
|
+
var splice = arrayProto.splice;
|
|
290
|
+
function listCacheDelete(key) {
|
|
291
|
+
var data = this.__data__, index = _assocIndexOf_default(data, key);
|
|
292
|
+
if (index < 0) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
var lastIndex = data.length - 1;
|
|
296
|
+
if (index == lastIndex) {
|
|
297
|
+
data.pop();
|
|
298
|
+
} else {
|
|
299
|
+
splice.call(data, index, 1);
|
|
300
|
+
}
|
|
301
|
+
--this.size;
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
var _listCacheDelete_default = listCacheDelete;
|
|
305
|
+
|
|
306
|
+
// node_modules/lodash-es/_listCacheGet.js
|
|
307
|
+
function listCacheGet(key) {
|
|
308
|
+
var data = this.__data__, index = _assocIndexOf_default(data, key);
|
|
309
|
+
return index < 0 ? undefined : data[index][1];
|
|
310
|
+
}
|
|
311
|
+
var _listCacheGet_default = listCacheGet;
|
|
312
|
+
|
|
313
|
+
// node_modules/lodash-es/_listCacheHas.js
|
|
314
|
+
function listCacheHas(key) {
|
|
315
|
+
return _assocIndexOf_default(this.__data__, key) > -1;
|
|
316
|
+
}
|
|
317
|
+
var _listCacheHas_default = listCacheHas;
|
|
318
|
+
|
|
319
|
+
// node_modules/lodash-es/_listCacheSet.js
|
|
320
|
+
function listCacheSet(key, value) {
|
|
321
|
+
var data = this.__data__, index = _assocIndexOf_default(data, key);
|
|
322
|
+
if (index < 0) {
|
|
323
|
+
++this.size;
|
|
324
|
+
data.push([key, value]);
|
|
325
|
+
} else {
|
|
326
|
+
data[index][1] = value;
|
|
327
|
+
}
|
|
328
|
+
return this;
|
|
329
|
+
}
|
|
330
|
+
var _listCacheSet_default = listCacheSet;
|
|
331
|
+
|
|
332
|
+
// node_modules/lodash-es/_ListCache.js
|
|
333
|
+
function ListCache(entries) {
|
|
334
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
335
|
+
this.clear();
|
|
336
|
+
while (++index < length) {
|
|
337
|
+
var entry = entries[index];
|
|
338
|
+
this.set(entry[0], entry[1]);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
ListCache.prototype.clear = _listCacheClear_default;
|
|
342
|
+
ListCache.prototype["delete"] = _listCacheDelete_default;
|
|
343
|
+
ListCache.prototype.get = _listCacheGet_default;
|
|
344
|
+
ListCache.prototype.has = _listCacheHas_default;
|
|
345
|
+
ListCache.prototype.set = _listCacheSet_default;
|
|
346
|
+
var _ListCache_default = ListCache;
|
|
347
|
+
|
|
348
|
+
// node_modules/lodash-es/_Map.js
|
|
349
|
+
var Map2 = _getNative_default(_root_default, "Map");
|
|
350
|
+
var _Map_default = Map2;
|
|
351
|
+
|
|
352
|
+
// node_modules/lodash-es/_mapCacheClear.js
|
|
353
|
+
function mapCacheClear() {
|
|
354
|
+
this.size = 0;
|
|
355
|
+
this.__data__ = {
|
|
356
|
+
hash: new _Hash_default,
|
|
357
|
+
map: new (_Map_default || _ListCache_default),
|
|
358
|
+
string: new _Hash_default
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
var _mapCacheClear_default = mapCacheClear;
|
|
362
|
+
|
|
363
|
+
// node_modules/lodash-es/_isKeyable.js
|
|
364
|
+
function isKeyable(value) {
|
|
365
|
+
var type = typeof value;
|
|
366
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
367
|
+
}
|
|
368
|
+
var _isKeyable_default = isKeyable;
|
|
369
|
+
|
|
370
|
+
// node_modules/lodash-es/_getMapData.js
|
|
371
|
+
function getMapData(map, key) {
|
|
372
|
+
var data = map.__data__;
|
|
373
|
+
return _isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
374
|
+
}
|
|
375
|
+
var _getMapData_default = getMapData;
|
|
376
|
+
|
|
377
|
+
// node_modules/lodash-es/_mapCacheDelete.js
|
|
378
|
+
function mapCacheDelete(key) {
|
|
379
|
+
var result = _getMapData_default(this, key)["delete"](key);
|
|
380
|
+
this.size -= result ? 1 : 0;
|
|
381
|
+
return result;
|
|
382
|
+
}
|
|
383
|
+
var _mapCacheDelete_default = mapCacheDelete;
|
|
384
|
+
|
|
385
|
+
// node_modules/lodash-es/_mapCacheGet.js
|
|
386
|
+
function mapCacheGet(key) {
|
|
387
|
+
return _getMapData_default(this, key).get(key);
|
|
388
|
+
}
|
|
389
|
+
var _mapCacheGet_default = mapCacheGet;
|
|
390
|
+
|
|
391
|
+
// node_modules/lodash-es/_mapCacheHas.js
|
|
392
|
+
function mapCacheHas(key) {
|
|
393
|
+
return _getMapData_default(this, key).has(key);
|
|
394
|
+
}
|
|
395
|
+
var _mapCacheHas_default = mapCacheHas;
|
|
396
|
+
|
|
397
|
+
// node_modules/lodash-es/_mapCacheSet.js
|
|
398
|
+
function mapCacheSet(key, value) {
|
|
399
|
+
var data = _getMapData_default(this, key), size = data.size;
|
|
400
|
+
data.set(key, value);
|
|
401
|
+
this.size += data.size == size ? 0 : 1;
|
|
402
|
+
return this;
|
|
403
|
+
}
|
|
404
|
+
var _mapCacheSet_default = mapCacheSet;
|
|
405
|
+
|
|
406
|
+
// node_modules/lodash-es/_MapCache.js
|
|
407
|
+
function MapCache(entries) {
|
|
408
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
409
|
+
this.clear();
|
|
410
|
+
while (++index < length) {
|
|
411
|
+
var entry = entries[index];
|
|
412
|
+
this.set(entry[0], entry[1]);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
MapCache.prototype.clear = _mapCacheClear_default;
|
|
416
|
+
MapCache.prototype["delete"] = _mapCacheDelete_default;
|
|
417
|
+
MapCache.prototype.get = _mapCacheGet_default;
|
|
418
|
+
MapCache.prototype.has = _mapCacheHas_default;
|
|
419
|
+
MapCache.prototype.set = _mapCacheSet_default;
|
|
420
|
+
var _MapCache_default = MapCache;
|
|
421
|
+
|
|
422
|
+
// node_modules/lodash-es/memoize.js
|
|
423
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
424
|
+
function memoize(func, resolver) {
|
|
425
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
426
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
427
|
+
}
|
|
428
|
+
var memoized = function() {
|
|
429
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
430
|
+
if (cache.has(key)) {
|
|
431
|
+
return cache.get(key);
|
|
432
|
+
}
|
|
433
|
+
var result = func.apply(this, args);
|
|
434
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
435
|
+
return result;
|
|
436
|
+
};
|
|
437
|
+
memoized.cache = new (memoize.Cache || _MapCache_default);
|
|
438
|
+
return memoized;
|
|
439
|
+
}
|
|
440
|
+
memoize.Cache = _MapCache_default;
|
|
441
|
+
var memoize_default = memoize;
|
|
442
|
+
|
|
443
|
+
// node_modules/lodash-es/_memoizeCapped.js
|
|
444
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
445
|
+
function memoizeCapped(func) {
|
|
446
|
+
var result = memoize_default(func, function(key) {
|
|
447
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
448
|
+
cache.clear();
|
|
449
|
+
}
|
|
450
|
+
return key;
|
|
451
|
+
});
|
|
452
|
+
var cache = result.cache;
|
|
453
|
+
return result;
|
|
454
|
+
}
|
|
455
|
+
var _memoizeCapped_default = memoizeCapped;
|
|
456
|
+
|
|
457
|
+
// node_modules/lodash-es/_stringToPath.js
|
|
458
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
459
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
460
|
+
var stringToPath = _memoizeCapped_default(function(string) {
|
|
461
|
+
var result = [];
|
|
462
|
+
if (string.charCodeAt(0) === 46) {
|
|
463
|
+
result.push("");
|
|
464
|
+
}
|
|
465
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
466
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
467
|
+
});
|
|
468
|
+
return result;
|
|
469
|
+
});
|
|
470
|
+
var _stringToPath_default = stringToPath;
|
|
471
|
+
|
|
472
|
+
// node_modules/lodash-es/_baseToString.js
|
|
473
|
+
var INFINITY = 1 / 0;
|
|
474
|
+
var symbolProto = _Symbol_default ? _Symbol_default.prototype : undefined;
|
|
475
|
+
var symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
476
|
+
function baseToString(value) {
|
|
477
|
+
if (typeof value == "string") {
|
|
478
|
+
return value;
|
|
479
|
+
}
|
|
480
|
+
if (isArray_default(value)) {
|
|
481
|
+
return _arrayMap_default(value, baseToString) + "";
|
|
482
|
+
}
|
|
483
|
+
if (isSymbol_default(value)) {
|
|
484
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
485
|
+
}
|
|
486
|
+
var result = value + "";
|
|
487
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
488
|
+
}
|
|
489
|
+
var _baseToString_default = baseToString;
|
|
490
|
+
|
|
491
|
+
// node_modules/lodash-es/toString.js
|
|
492
|
+
function toString(value) {
|
|
493
|
+
return value == null ? "" : _baseToString_default(value);
|
|
494
|
+
}
|
|
495
|
+
var toString_default = toString;
|
|
496
|
+
|
|
497
|
+
// node_modules/lodash-es/_castPath.js
|
|
498
|
+
function castPath(value, object) {
|
|
499
|
+
if (isArray_default(value)) {
|
|
500
|
+
return value;
|
|
501
|
+
}
|
|
502
|
+
return _isKey_default(value, object) ? [value] : _stringToPath_default(toString_default(value));
|
|
503
|
+
}
|
|
504
|
+
var _castPath_default = castPath;
|
|
505
|
+
|
|
506
|
+
// node_modules/lodash-es/_toKey.js
|
|
507
|
+
var INFINITY2 = 1 / 0;
|
|
508
|
+
function toKey(value) {
|
|
509
|
+
if (typeof value == "string" || isSymbol_default(value)) {
|
|
510
|
+
return value;
|
|
511
|
+
}
|
|
512
|
+
var result = value + "";
|
|
513
|
+
return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
|
|
514
|
+
}
|
|
515
|
+
var _toKey_default = toKey;
|
|
516
|
+
|
|
517
|
+
// node_modules/lodash-es/_baseGet.js
|
|
518
|
+
function baseGet(object, path) {
|
|
519
|
+
path = _castPath_default(path, object);
|
|
520
|
+
var index = 0, length = path.length;
|
|
521
|
+
while (object != null && index < length) {
|
|
522
|
+
object = object[_toKey_default(path[index++])];
|
|
523
|
+
}
|
|
524
|
+
return index && index == length ? object : undefined;
|
|
525
|
+
}
|
|
526
|
+
var _baseGet_default = baseGet;
|
|
527
|
+
|
|
528
|
+
// node_modules/lodash-es/_stackClear.js
|
|
529
|
+
function stackClear() {
|
|
530
|
+
this.__data__ = new _ListCache_default;
|
|
531
|
+
this.size = 0;
|
|
532
|
+
}
|
|
533
|
+
var _stackClear_default = stackClear;
|
|
534
|
+
|
|
535
|
+
// node_modules/lodash-es/_stackDelete.js
|
|
536
|
+
function stackDelete(key) {
|
|
537
|
+
var data = this.__data__, result = data["delete"](key);
|
|
538
|
+
this.size = data.size;
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
var _stackDelete_default = stackDelete;
|
|
542
|
+
|
|
543
|
+
// node_modules/lodash-es/_stackGet.js
|
|
544
|
+
function stackGet(key) {
|
|
545
|
+
return this.__data__.get(key);
|
|
546
|
+
}
|
|
547
|
+
var _stackGet_default = stackGet;
|
|
548
|
+
|
|
549
|
+
// node_modules/lodash-es/_stackHas.js
|
|
550
|
+
function stackHas(key) {
|
|
551
|
+
return this.__data__.has(key);
|
|
552
|
+
}
|
|
553
|
+
var _stackHas_default = stackHas;
|
|
554
|
+
|
|
555
|
+
// node_modules/lodash-es/_stackSet.js
|
|
556
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
557
|
+
function stackSet(key, value) {
|
|
558
|
+
var data = this.__data__;
|
|
559
|
+
if (data instanceof _ListCache_default) {
|
|
560
|
+
var pairs = data.__data__;
|
|
561
|
+
if (!_Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
562
|
+
pairs.push([key, value]);
|
|
563
|
+
this.size = ++data.size;
|
|
564
|
+
return this;
|
|
565
|
+
}
|
|
566
|
+
data = this.__data__ = new _MapCache_default(pairs);
|
|
567
|
+
}
|
|
568
|
+
data.set(key, value);
|
|
569
|
+
this.size = data.size;
|
|
570
|
+
return this;
|
|
571
|
+
}
|
|
572
|
+
var _stackSet_default = stackSet;
|
|
573
|
+
|
|
574
|
+
// node_modules/lodash-es/_Stack.js
|
|
575
|
+
function Stack(entries) {
|
|
576
|
+
var data = this.__data__ = new _ListCache_default(entries);
|
|
577
|
+
this.size = data.size;
|
|
578
|
+
}
|
|
579
|
+
Stack.prototype.clear = _stackClear_default;
|
|
580
|
+
Stack.prototype["delete"] = _stackDelete_default;
|
|
581
|
+
Stack.prototype.get = _stackGet_default;
|
|
582
|
+
Stack.prototype.has = _stackHas_default;
|
|
583
|
+
Stack.prototype.set = _stackSet_default;
|
|
584
|
+
var _Stack_default = Stack;
|
|
585
|
+
|
|
586
|
+
// node_modules/lodash-es/_setCacheAdd.js
|
|
587
|
+
var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
|
|
588
|
+
function setCacheAdd(value) {
|
|
589
|
+
this.__data__.set(value, HASH_UNDEFINED3);
|
|
590
|
+
return this;
|
|
591
|
+
}
|
|
592
|
+
var _setCacheAdd_default = setCacheAdd;
|
|
593
|
+
|
|
594
|
+
// node_modules/lodash-es/_setCacheHas.js
|
|
595
|
+
function setCacheHas(value) {
|
|
596
|
+
return this.__data__.has(value);
|
|
597
|
+
}
|
|
598
|
+
var _setCacheHas_default = setCacheHas;
|
|
599
|
+
|
|
600
|
+
// node_modules/lodash-es/_SetCache.js
|
|
601
|
+
function SetCache(values) {
|
|
602
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
603
|
+
this.__data__ = new _MapCache_default;
|
|
604
|
+
while (++index < length) {
|
|
605
|
+
this.add(values[index]);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd_default;
|
|
609
|
+
SetCache.prototype.has = _setCacheHas_default;
|
|
610
|
+
var _SetCache_default = SetCache;
|
|
611
|
+
|
|
612
|
+
// node_modules/lodash-es/_arraySome.js
|
|
613
|
+
function arraySome(array, predicate) {
|
|
614
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
615
|
+
while (++index < length) {
|
|
616
|
+
if (predicate(array[index], index, array)) {
|
|
617
|
+
return true;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return false;
|
|
621
|
+
}
|
|
622
|
+
var _arraySome_default = arraySome;
|
|
623
|
+
|
|
624
|
+
// node_modules/lodash-es/_cacheHas.js
|
|
625
|
+
function cacheHas(cache, key) {
|
|
626
|
+
return cache.has(key);
|
|
627
|
+
}
|
|
628
|
+
var _cacheHas_default = cacheHas;
|
|
629
|
+
|
|
630
|
+
// node_modules/lodash-es/_equalArrays.js
|
|
631
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
632
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
633
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
634
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
635
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
636
|
+
return false;
|
|
637
|
+
}
|
|
638
|
+
var arrStacked = stack.get(array);
|
|
639
|
+
var othStacked = stack.get(other);
|
|
640
|
+
if (arrStacked && othStacked) {
|
|
641
|
+
return arrStacked == other && othStacked == array;
|
|
642
|
+
}
|
|
643
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new _SetCache_default : undefined;
|
|
644
|
+
stack.set(array, other);
|
|
645
|
+
stack.set(other, array);
|
|
646
|
+
while (++index < arrLength) {
|
|
647
|
+
var arrValue = array[index], othValue = other[index];
|
|
648
|
+
if (customizer) {
|
|
649
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
650
|
+
}
|
|
651
|
+
if (compared !== undefined) {
|
|
652
|
+
if (compared) {
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
result = false;
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
if (seen) {
|
|
659
|
+
if (!_arraySome_default(other, function(othValue2, othIndex) {
|
|
660
|
+
if (!_cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
661
|
+
return seen.push(othIndex);
|
|
662
|
+
}
|
|
663
|
+
})) {
|
|
664
|
+
result = false;
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
668
|
+
result = false;
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
stack["delete"](array);
|
|
673
|
+
stack["delete"](other);
|
|
674
|
+
return result;
|
|
675
|
+
}
|
|
676
|
+
var _equalArrays_default = equalArrays;
|
|
677
|
+
|
|
678
|
+
// node_modules/lodash-es/_Uint8Array.js
|
|
679
|
+
var Uint8Array = _root_default.Uint8Array;
|
|
680
|
+
var _Uint8Array_default = Uint8Array;
|
|
681
|
+
|
|
682
|
+
// node_modules/lodash-es/_mapToArray.js
|
|
683
|
+
function mapToArray(map) {
|
|
684
|
+
var index = -1, result = Array(map.size);
|
|
685
|
+
map.forEach(function(value, key) {
|
|
686
|
+
result[++index] = [key, value];
|
|
687
|
+
});
|
|
688
|
+
return result;
|
|
689
|
+
}
|
|
690
|
+
var _mapToArray_default = mapToArray;
|
|
691
|
+
|
|
692
|
+
// node_modules/lodash-es/_setToArray.js
|
|
693
|
+
function setToArray(set) {
|
|
694
|
+
var index = -1, result = Array(set.size);
|
|
695
|
+
set.forEach(function(value) {
|
|
696
|
+
result[++index] = value;
|
|
697
|
+
});
|
|
698
|
+
return result;
|
|
699
|
+
}
|
|
700
|
+
var _setToArray_default = setToArray;
|
|
701
|
+
|
|
702
|
+
// node_modules/lodash-es/_equalByTag.js
|
|
703
|
+
var COMPARE_PARTIAL_FLAG2 = 1;
|
|
704
|
+
var COMPARE_UNORDERED_FLAG2 = 2;
|
|
705
|
+
var boolTag = "[object Boolean]";
|
|
706
|
+
var dateTag = "[object Date]";
|
|
707
|
+
var errorTag = "[object Error]";
|
|
708
|
+
var mapTag = "[object Map]";
|
|
709
|
+
var numberTag = "[object Number]";
|
|
710
|
+
var regexpTag = "[object RegExp]";
|
|
711
|
+
var setTag = "[object Set]";
|
|
712
|
+
var stringTag = "[object String]";
|
|
713
|
+
var symbolTag2 = "[object Symbol]";
|
|
714
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
715
|
+
var dataViewTag = "[object DataView]";
|
|
716
|
+
var symbolProto2 = _Symbol_default ? _Symbol_default.prototype : undefined;
|
|
717
|
+
var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : undefined;
|
|
718
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
719
|
+
switch (tag) {
|
|
720
|
+
case dataViewTag:
|
|
721
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
object = object.buffer;
|
|
725
|
+
other = other.buffer;
|
|
726
|
+
case arrayBufferTag:
|
|
727
|
+
if (object.byteLength != other.byteLength || !equalFunc(new _Uint8Array_default(object), new _Uint8Array_default(other))) {
|
|
728
|
+
return false;
|
|
729
|
+
}
|
|
730
|
+
return true;
|
|
731
|
+
case boolTag:
|
|
732
|
+
case dateTag:
|
|
733
|
+
case numberTag:
|
|
734
|
+
return eq_default(+object, +other);
|
|
735
|
+
case errorTag:
|
|
736
|
+
return object.name == other.name && object.message == other.message;
|
|
737
|
+
case regexpTag:
|
|
738
|
+
case stringTag:
|
|
739
|
+
return object == other + "";
|
|
740
|
+
case mapTag:
|
|
741
|
+
var convert = _mapToArray_default;
|
|
742
|
+
case setTag:
|
|
743
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
|
|
744
|
+
convert || (convert = _setToArray_default);
|
|
745
|
+
if (object.size != other.size && !isPartial) {
|
|
746
|
+
return false;
|
|
747
|
+
}
|
|
748
|
+
var stacked = stack.get(object);
|
|
749
|
+
if (stacked) {
|
|
750
|
+
return stacked == other;
|
|
751
|
+
}
|
|
752
|
+
bitmask |= COMPARE_UNORDERED_FLAG2;
|
|
753
|
+
stack.set(object, other);
|
|
754
|
+
var result = _equalArrays_default(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
755
|
+
stack["delete"](object);
|
|
756
|
+
return result;
|
|
757
|
+
case symbolTag2:
|
|
758
|
+
if (symbolValueOf) {
|
|
759
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
var _equalByTag_default = equalByTag;
|
|
765
|
+
|
|
766
|
+
// node_modules/lodash-es/_arrayPush.js
|
|
767
|
+
function arrayPush(array, values) {
|
|
768
|
+
var index = -1, length = values.length, offset = array.length;
|
|
769
|
+
while (++index < length) {
|
|
770
|
+
array[offset + index] = values[index];
|
|
771
|
+
}
|
|
772
|
+
return array;
|
|
773
|
+
}
|
|
774
|
+
var _arrayPush_default = arrayPush;
|
|
775
|
+
|
|
776
|
+
// node_modules/lodash-es/_baseGetAllKeys.js
|
|
777
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
778
|
+
var result = keysFunc(object);
|
|
779
|
+
return isArray_default(object) ? result : _arrayPush_default(result, symbolsFunc(object));
|
|
780
|
+
}
|
|
781
|
+
var _baseGetAllKeys_default = baseGetAllKeys;
|
|
782
|
+
|
|
783
|
+
// node_modules/lodash-es/_arrayFilter.js
|
|
784
|
+
function arrayFilter(array, predicate) {
|
|
785
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
786
|
+
while (++index < length) {
|
|
787
|
+
var value = array[index];
|
|
788
|
+
if (predicate(value, index, array)) {
|
|
789
|
+
result[resIndex++] = value;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
return result;
|
|
793
|
+
}
|
|
794
|
+
var _arrayFilter_default = arrayFilter;
|
|
795
|
+
|
|
796
|
+
// node_modules/lodash-es/stubArray.js
|
|
797
|
+
function stubArray() {
|
|
798
|
+
return [];
|
|
799
|
+
}
|
|
800
|
+
var stubArray_default = stubArray;
|
|
801
|
+
|
|
802
|
+
// node_modules/lodash-es/_getSymbols.js
|
|
803
|
+
var objectProto6 = Object.prototype;
|
|
804
|
+
var propertyIsEnumerable = objectProto6.propertyIsEnumerable;
|
|
805
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
806
|
+
var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
|
|
807
|
+
if (object == null) {
|
|
808
|
+
return [];
|
|
809
|
+
}
|
|
810
|
+
object = Object(object);
|
|
811
|
+
return _arrayFilter_default(nativeGetSymbols(object), function(symbol) {
|
|
812
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
var _getSymbols_default = getSymbols;
|
|
816
|
+
|
|
817
|
+
// node_modules/lodash-es/_baseTimes.js
|
|
818
|
+
function baseTimes(n, iteratee) {
|
|
819
|
+
var index = -1, result = Array(n);
|
|
820
|
+
while (++index < n) {
|
|
821
|
+
result[index] = iteratee(index);
|
|
822
|
+
}
|
|
823
|
+
return result;
|
|
824
|
+
}
|
|
825
|
+
var _baseTimes_default = baseTimes;
|
|
826
|
+
|
|
827
|
+
// node_modules/lodash-es/_baseIsArguments.js
|
|
828
|
+
var argsTag = "[object Arguments]";
|
|
829
|
+
function baseIsArguments(value) {
|
|
830
|
+
return isObjectLike_default(value) && _baseGetTag_default(value) == argsTag;
|
|
831
|
+
}
|
|
832
|
+
var _baseIsArguments_default = baseIsArguments;
|
|
833
|
+
|
|
834
|
+
// node_modules/lodash-es/isArguments.js
|
|
835
|
+
var objectProto7 = Object.prototype;
|
|
836
|
+
var hasOwnProperty5 = objectProto7.hasOwnProperty;
|
|
837
|
+
var propertyIsEnumerable2 = objectProto7.propertyIsEnumerable;
|
|
838
|
+
var isArguments = _baseIsArguments_default(function() {
|
|
839
|
+
return arguments;
|
|
840
|
+
}()) ? _baseIsArguments_default : function(value) {
|
|
841
|
+
return isObjectLike_default(value) && hasOwnProperty5.call(value, "callee") && !propertyIsEnumerable2.call(value, "callee");
|
|
842
|
+
};
|
|
843
|
+
var isArguments_default = isArguments;
|
|
844
|
+
|
|
845
|
+
// node_modules/lodash-es/isBuffer.js
|
|
846
|
+
var exports_isBuffer = {};
|
|
847
|
+
__export(exports_isBuffer, {
|
|
848
|
+
default: () => isBuffer_default
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
// node_modules/lodash-es/stubFalse.js
|
|
852
|
+
function stubFalse() {
|
|
853
|
+
return false;
|
|
854
|
+
}
|
|
855
|
+
var stubFalse_default = stubFalse;
|
|
856
|
+
|
|
857
|
+
// node_modules/lodash-es/isBuffer.js
|
|
858
|
+
var freeExports = typeof exports_isBuffer == "object" && exports_isBuffer && !exports_isBuffer.nodeType && exports_isBuffer;
|
|
859
|
+
var freeModule = freeExports && typeof module_isBuffer == "object" && module_isBuffer && !module_isBuffer.nodeType && module_isBuffer;
|
|
860
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
861
|
+
var Buffer2 = moduleExports ? _root_default.Buffer : undefined;
|
|
862
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined;
|
|
863
|
+
var isBuffer = nativeIsBuffer || stubFalse_default;
|
|
864
|
+
var isBuffer_default = isBuffer;
|
|
865
|
+
|
|
866
|
+
// node_modules/lodash-es/_isIndex.js
|
|
867
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
868
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
869
|
+
function isIndex(value, length) {
|
|
870
|
+
var type = typeof value;
|
|
871
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
872
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
873
|
+
}
|
|
874
|
+
var _isIndex_default = isIndex;
|
|
875
|
+
|
|
876
|
+
// node_modules/lodash-es/isLength.js
|
|
877
|
+
var MAX_SAFE_INTEGER2 = 9007199254740991;
|
|
878
|
+
function isLength(value) {
|
|
879
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
|
|
880
|
+
}
|
|
881
|
+
var isLength_default = isLength;
|
|
882
|
+
|
|
883
|
+
// node_modules/lodash-es/_baseIsTypedArray.js
|
|
884
|
+
var argsTag2 = "[object Arguments]";
|
|
885
|
+
var arrayTag = "[object Array]";
|
|
886
|
+
var boolTag2 = "[object Boolean]";
|
|
887
|
+
var dateTag2 = "[object Date]";
|
|
888
|
+
var errorTag2 = "[object Error]";
|
|
889
|
+
var funcTag2 = "[object Function]";
|
|
890
|
+
var mapTag2 = "[object Map]";
|
|
891
|
+
var numberTag2 = "[object Number]";
|
|
892
|
+
var objectTag = "[object Object]";
|
|
893
|
+
var regexpTag2 = "[object RegExp]";
|
|
894
|
+
var setTag2 = "[object Set]";
|
|
895
|
+
var stringTag2 = "[object String]";
|
|
896
|
+
var weakMapTag = "[object WeakMap]";
|
|
897
|
+
var arrayBufferTag2 = "[object ArrayBuffer]";
|
|
898
|
+
var dataViewTag2 = "[object DataView]";
|
|
899
|
+
var float32Tag = "[object Float32Array]";
|
|
900
|
+
var float64Tag = "[object Float64Array]";
|
|
901
|
+
var int8Tag = "[object Int8Array]";
|
|
902
|
+
var int16Tag = "[object Int16Array]";
|
|
903
|
+
var int32Tag = "[object Int32Array]";
|
|
904
|
+
var uint8Tag = "[object Uint8Array]";
|
|
905
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
906
|
+
var uint16Tag = "[object Uint16Array]";
|
|
907
|
+
var uint32Tag = "[object Uint32Array]";
|
|
908
|
+
var typedArrayTags = {};
|
|
909
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
910
|
+
typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag2] = typedArrayTags[boolTag2] = typedArrayTags[dataViewTag2] = typedArrayTags[dateTag2] = typedArrayTags[errorTag2] = typedArrayTags[funcTag2] = typedArrayTags[mapTag2] = typedArrayTags[numberTag2] = typedArrayTags[objectTag] = typedArrayTags[regexpTag2] = typedArrayTags[setTag2] = typedArrayTags[stringTag2] = typedArrayTags[weakMapTag] = false;
|
|
911
|
+
function baseIsTypedArray(value) {
|
|
912
|
+
return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[_baseGetTag_default(value)];
|
|
913
|
+
}
|
|
914
|
+
var _baseIsTypedArray_default = baseIsTypedArray;
|
|
915
|
+
|
|
916
|
+
// node_modules/lodash-es/_baseUnary.js
|
|
917
|
+
function baseUnary(func) {
|
|
918
|
+
return function(value) {
|
|
919
|
+
return func(value);
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
var _baseUnary_default = baseUnary;
|
|
923
|
+
|
|
924
|
+
// node_modules/lodash-es/_nodeUtil.js
|
|
925
|
+
var exports__nodeUtil = {};
|
|
926
|
+
__export(exports__nodeUtil, {
|
|
927
|
+
default: () => _nodeUtil_default
|
|
928
|
+
});
|
|
929
|
+
var freeExports2 = typeof exports__nodeUtil == "object" && exports__nodeUtil && !exports__nodeUtil.nodeType && exports__nodeUtil;
|
|
930
|
+
var freeModule2 = freeExports2 && typeof module__nodeUtil == "object" && module__nodeUtil && !module__nodeUtil.nodeType && module__nodeUtil;
|
|
931
|
+
var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
|
|
932
|
+
var freeProcess = moduleExports2 && _freeGlobal_default.process;
|
|
933
|
+
var nodeUtil = function() {
|
|
934
|
+
try {
|
|
935
|
+
var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
|
|
936
|
+
if (types) {
|
|
937
|
+
return types;
|
|
938
|
+
}
|
|
939
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
940
|
+
} catch (e) {}
|
|
941
|
+
}();
|
|
942
|
+
var _nodeUtil_default = nodeUtil;
|
|
943
|
+
|
|
944
|
+
// node_modules/lodash-es/isTypedArray.js
|
|
945
|
+
var nodeIsTypedArray = _nodeUtil_default && _nodeUtil_default.isTypedArray;
|
|
946
|
+
var isTypedArray = nodeIsTypedArray ? _baseUnary_default(nodeIsTypedArray) : _baseIsTypedArray_default;
|
|
947
|
+
var isTypedArray_default = isTypedArray;
|
|
948
|
+
|
|
949
|
+
// node_modules/lodash-es/_arrayLikeKeys.js
|
|
950
|
+
var objectProto8 = Object.prototype;
|
|
951
|
+
var hasOwnProperty6 = objectProto8.hasOwnProperty;
|
|
952
|
+
function arrayLikeKeys(value, inherited) {
|
|
953
|
+
var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? _baseTimes_default(value.length, String) : [], length = result.length;
|
|
954
|
+
for (var key in value) {
|
|
955
|
+
if ((inherited || hasOwnProperty6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || _isIndex_default(key, length)))) {
|
|
956
|
+
result.push(key);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
return result;
|
|
960
|
+
}
|
|
961
|
+
var _arrayLikeKeys_default = arrayLikeKeys;
|
|
962
|
+
|
|
963
|
+
// node_modules/lodash-es/_isPrototype.js
|
|
964
|
+
var objectProto9 = Object.prototype;
|
|
965
|
+
function isPrototype(value) {
|
|
966
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto9;
|
|
967
|
+
return value === proto;
|
|
968
|
+
}
|
|
969
|
+
var _isPrototype_default = isPrototype;
|
|
970
|
+
|
|
971
|
+
// node_modules/lodash-es/_overArg.js
|
|
972
|
+
function overArg(func, transform) {
|
|
973
|
+
return function(arg) {
|
|
974
|
+
return func(transform(arg));
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
var _overArg_default = overArg;
|
|
978
|
+
|
|
979
|
+
// node_modules/lodash-es/_nativeKeys.js
|
|
980
|
+
var nativeKeys = _overArg_default(Object.keys, Object);
|
|
981
|
+
var _nativeKeys_default = nativeKeys;
|
|
982
|
+
|
|
983
|
+
// node_modules/lodash-es/_baseKeys.js
|
|
984
|
+
var objectProto10 = Object.prototype;
|
|
985
|
+
var hasOwnProperty7 = objectProto10.hasOwnProperty;
|
|
986
|
+
function baseKeys(object) {
|
|
987
|
+
if (!_isPrototype_default(object)) {
|
|
988
|
+
return _nativeKeys_default(object);
|
|
989
|
+
}
|
|
990
|
+
var result = [];
|
|
991
|
+
for (var key in Object(object)) {
|
|
992
|
+
if (hasOwnProperty7.call(object, key) && key != "constructor") {
|
|
993
|
+
result.push(key);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
return result;
|
|
997
|
+
}
|
|
998
|
+
var _baseKeys_default = baseKeys;
|
|
999
|
+
|
|
1000
|
+
// node_modules/lodash-es/isArrayLike.js
|
|
1001
|
+
function isArrayLike(value) {
|
|
1002
|
+
return value != null && isLength_default(value.length) && !isFunction_default(value);
|
|
1003
|
+
}
|
|
1004
|
+
var isArrayLike_default = isArrayLike;
|
|
1005
|
+
|
|
1006
|
+
// node_modules/lodash-es/keys.js
|
|
1007
|
+
function keys(object) {
|
|
1008
|
+
return isArrayLike_default(object) ? _arrayLikeKeys_default(object) : _baseKeys_default(object);
|
|
1009
|
+
}
|
|
1010
|
+
var keys_default = keys;
|
|
1011
|
+
|
|
1012
|
+
// node_modules/lodash-es/_getAllKeys.js
|
|
1013
|
+
function getAllKeys(object) {
|
|
1014
|
+
return _baseGetAllKeys_default(object, keys_default, _getSymbols_default);
|
|
1015
|
+
}
|
|
1016
|
+
var _getAllKeys_default = getAllKeys;
|
|
1017
|
+
|
|
1018
|
+
// node_modules/lodash-es/_equalObjects.js
|
|
1019
|
+
var COMPARE_PARTIAL_FLAG3 = 1;
|
|
1020
|
+
var objectProto11 = Object.prototype;
|
|
1021
|
+
var hasOwnProperty8 = objectProto11.hasOwnProperty;
|
|
1022
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1023
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = _getAllKeys_default(object), objLength = objProps.length, othProps = _getAllKeys_default(other), othLength = othProps.length;
|
|
1024
|
+
if (objLength != othLength && !isPartial) {
|
|
1025
|
+
return false;
|
|
1026
|
+
}
|
|
1027
|
+
var index = objLength;
|
|
1028
|
+
while (index--) {
|
|
1029
|
+
var key = objProps[index];
|
|
1030
|
+
if (!(isPartial ? key in other : hasOwnProperty8.call(other, key))) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
var objStacked = stack.get(object);
|
|
1035
|
+
var othStacked = stack.get(other);
|
|
1036
|
+
if (objStacked && othStacked) {
|
|
1037
|
+
return objStacked == other && othStacked == object;
|
|
1038
|
+
}
|
|
1039
|
+
var result = true;
|
|
1040
|
+
stack.set(object, other);
|
|
1041
|
+
stack.set(other, object);
|
|
1042
|
+
var skipCtor = isPartial;
|
|
1043
|
+
while (++index < objLength) {
|
|
1044
|
+
key = objProps[index];
|
|
1045
|
+
var objValue = object[key], othValue = other[key];
|
|
1046
|
+
if (customizer) {
|
|
1047
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1048
|
+
}
|
|
1049
|
+
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1050
|
+
result = false;
|
|
1051
|
+
break;
|
|
1052
|
+
}
|
|
1053
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
1054
|
+
}
|
|
1055
|
+
if (result && !skipCtor) {
|
|
1056
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1057
|
+
if (objCtor != othCtor && (("constructor" in object) && ("constructor" in other)) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1058
|
+
result = false;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
stack["delete"](object);
|
|
1062
|
+
stack["delete"](other);
|
|
1063
|
+
return result;
|
|
1064
|
+
}
|
|
1065
|
+
var _equalObjects_default = equalObjects;
|
|
1066
|
+
|
|
1067
|
+
// node_modules/lodash-es/_DataView.js
|
|
1068
|
+
var DataView = _getNative_default(_root_default, "DataView");
|
|
1069
|
+
var _DataView_default = DataView;
|
|
1070
|
+
|
|
1071
|
+
// node_modules/lodash-es/_Promise.js
|
|
1072
|
+
var Promise2 = _getNative_default(_root_default, "Promise");
|
|
1073
|
+
var _Promise_default = Promise2;
|
|
1074
|
+
|
|
1075
|
+
// node_modules/lodash-es/_Set.js
|
|
1076
|
+
var Set2 = _getNative_default(_root_default, "Set");
|
|
1077
|
+
var _Set_default = Set2;
|
|
1078
|
+
|
|
1079
|
+
// node_modules/lodash-es/_WeakMap.js
|
|
1080
|
+
var WeakMap2 = _getNative_default(_root_default, "WeakMap");
|
|
1081
|
+
var _WeakMap_default = WeakMap2;
|
|
1082
|
+
|
|
1083
|
+
// node_modules/lodash-es/_getTag.js
|
|
1084
|
+
var mapTag3 = "[object Map]";
|
|
1085
|
+
var objectTag2 = "[object Object]";
|
|
1086
|
+
var promiseTag = "[object Promise]";
|
|
1087
|
+
var setTag3 = "[object Set]";
|
|
1088
|
+
var weakMapTag2 = "[object WeakMap]";
|
|
1089
|
+
var dataViewTag3 = "[object DataView]";
|
|
1090
|
+
var dataViewCtorString = _toSource_default(_DataView_default);
|
|
1091
|
+
var mapCtorString = _toSource_default(_Map_default);
|
|
1092
|
+
var promiseCtorString = _toSource_default(_Promise_default);
|
|
1093
|
+
var setCtorString = _toSource_default(_Set_default);
|
|
1094
|
+
var weakMapCtorString = _toSource_default(_WeakMap_default);
|
|
1095
|
+
var getTag = _baseGetTag_default;
|
|
1096
|
+
if (_DataView_default && getTag(new _DataView_default(new ArrayBuffer(1))) != dataViewTag3 || _Map_default && getTag(new _Map_default) != mapTag3 || _Promise_default && getTag(_Promise_default.resolve()) != promiseTag || _Set_default && getTag(new _Set_default) != setTag3 || _WeakMap_default && getTag(new _WeakMap_default) != weakMapTag2) {
|
|
1097
|
+
getTag = function(value) {
|
|
1098
|
+
var result = _baseGetTag_default(value), Ctor = result == objectTag2 ? value.constructor : undefined, ctorString = Ctor ? _toSource_default(Ctor) : "";
|
|
1099
|
+
if (ctorString) {
|
|
1100
|
+
switch (ctorString) {
|
|
1101
|
+
case dataViewCtorString:
|
|
1102
|
+
return dataViewTag3;
|
|
1103
|
+
case mapCtorString:
|
|
1104
|
+
return mapTag3;
|
|
1105
|
+
case promiseCtorString:
|
|
1106
|
+
return promiseTag;
|
|
1107
|
+
case setCtorString:
|
|
1108
|
+
return setTag3;
|
|
1109
|
+
case weakMapCtorString:
|
|
1110
|
+
return weakMapTag2;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return result;
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
var _getTag_default = getTag;
|
|
1117
|
+
|
|
1118
|
+
// node_modules/lodash-es/_baseIsEqualDeep.js
|
|
1119
|
+
var COMPARE_PARTIAL_FLAG4 = 1;
|
|
1120
|
+
var argsTag3 = "[object Arguments]";
|
|
1121
|
+
var arrayTag2 = "[object Array]";
|
|
1122
|
+
var objectTag3 = "[object Object]";
|
|
1123
|
+
var objectProto12 = Object.prototype;
|
|
1124
|
+
var hasOwnProperty9 = objectProto12.hasOwnProperty;
|
|
1125
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1126
|
+
var objIsArr = isArray_default(object), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag2 : _getTag_default(object), othTag = othIsArr ? arrayTag2 : _getTag_default(other);
|
|
1127
|
+
objTag = objTag == argsTag3 ? objectTag3 : objTag;
|
|
1128
|
+
othTag = othTag == argsTag3 ? objectTag3 : othTag;
|
|
1129
|
+
var objIsObj = objTag == objectTag3, othIsObj = othTag == objectTag3, isSameTag = objTag == othTag;
|
|
1130
|
+
if (isSameTag && isBuffer_default(object)) {
|
|
1131
|
+
if (!isBuffer_default(other)) {
|
|
1132
|
+
return false;
|
|
1133
|
+
}
|
|
1134
|
+
objIsArr = true;
|
|
1135
|
+
objIsObj = false;
|
|
1136
|
+
}
|
|
1137
|
+
if (isSameTag && !objIsObj) {
|
|
1138
|
+
stack || (stack = new _Stack_default);
|
|
1139
|
+
return objIsArr || isTypedArray_default(object) ? _equalArrays_default(object, other, bitmask, customizer, equalFunc, stack) : _equalByTag_default(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1140
|
+
}
|
|
1141
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
|
|
1142
|
+
var objIsWrapped = objIsObj && hasOwnProperty9.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty9.call(other, "__wrapped__");
|
|
1143
|
+
if (objIsWrapped || othIsWrapped) {
|
|
1144
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1145
|
+
stack || (stack = new _Stack_default);
|
|
1146
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
if (!isSameTag) {
|
|
1150
|
+
return false;
|
|
1151
|
+
}
|
|
1152
|
+
stack || (stack = new _Stack_default);
|
|
1153
|
+
return _equalObjects_default(object, other, bitmask, customizer, equalFunc, stack);
|
|
1154
|
+
}
|
|
1155
|
+
var _baseIsEqualDeep_default = baseIsEqualDeep;
|
|
1156
|
+
|
|
1157
|
+
// node_modules/lodash-es/_baseIsEqual.js
|
|
1158
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1159
|
+
if (value === other) {
|
|
1160
|
+
return true;
|
|
1161
|
+
}
|
|
1162
|
+
if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) {
|
|
1163
|
+
return value !== value && other !== other;
|
|
1164
|
+
}
|
|
1165
|
+
return _baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1166
|
+
}
|
|
1167
|
+
var _baseIsEqual_default = baseIsEqual;
|
|
1168
|
+
|
|
1169
|
+
// node_modules/lodash-es/_baseIsMatch.js
|
|
1170
|
+
var COMPARE_PARTIAL_FLAG5 = 1;
|
|
1171
|
+
var COMPARE_UNORDERED_FLAG3 = 2;
|
|
1172
|
+
function baseIsMatch(object, source, matchData, customizer) {
|
|
1173
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
1174
|
+
if (object == null) {
|
|
1175
|
+
return !length;
|
|
1176
|
+
}
|
|
1177
|
+
object = Object(object);
|
|
1178
|
+
while (index--) {
|
|
1179
|
+
var data = matchData[index];
|
|
1180
|
+
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1181
|
+
return false;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
while (++index < length) {
|
|
1185
|
+
data = matchData[index];
|
|
1186
|
+
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1187
|
+
if (noCustomizer && data[2]) {
|
|
1188
|
+
if (objValue === undefined && !(key in object)) {
|
|
1189
|
+
return false;
|
|
1190
|
+
}
|
|
1191
|
+
} else {
|
|
1192
|
+
var stack = new _Stack_default;
|
|
1193
|
+
if (customizer) {
|
|
1194
|
+
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
1195
|
+
}
|
|
1196
|
+
if (!(result === undefined ? _baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3, customizer, stack) : result)) {
|
|
1197
|
+
return false;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
return true;
|
|
1202
|
+
}
|
|
1203
|
+
var _baseIsMatch_default = baseIsMatch;
|
|
1204
|
+
|
|
1205
|
+
// node_modules/lodash-es/_isStrictComparable.js
|
|
1206
|
+
function isStrictComparable(value) {
|
|
1207
|
+
return value === value && !isObject_default(value);
|
|
1208
|
+
}
|
|
1209
|
+
var _isStrictComparable_default = isStrictComparable;
|
|
1210
|
+
|
|
1211
|
+
// node_modules/lodash-es/_getMatchData.js
|
|
1212
|
+
function getMatchData(object) {
|
|
1213
|
+
var result = keys_default(object), length = result.length;
|
|
1214
|
+
while (length--) {
|
|
1215
|
+
var key = result[length], value = object[key];
|
|
1216
|
+
result[length] = [key, value, _isStrictComparable_default(value)];
|
|
1217
|
+
}
|
|
1218
|
+
return result;
|
|
1219
|
+
}
|
|
1220
|
+
var _getMatchData_default = getMatchData;
|
|
1221
|
+
|
|
1222
|
+
// node_modules/lodash-es/_matchesStrictComparable.js
|
|
1223
|
+
function matchesStrictComparable(key, srcValue) {
|
|
1224
|
+
return function(object) {
|
|
1225
|
+
if (object == null) {
|
|
1226
|
+
return false;
|
|
1227
|
+
}
|
|
1228
|
+
return object[key] === srcValue && (srcValue !== undefined || (key in Object(object)));
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
var _matchesStrictComparable_default = matchesStrictComparable;
|
|
1232
|
+
|
|
1233
|
+
// node_modules/lodash-es/_baseMatches.js
|
|
1234
|
+
function baseMatches(source) {
|
|
1235
|
+
var matchData = _getMatchData_default(source);
|
|
1236
|
+
if (matchData.length == 1 && matchData[0][2]) {
|
|
1237
|
+
return _matchesStrictComparable_default(matchData[0][0], matchData[0][1]);
|
|
1238
|
+
}
|
|
1239
|
+
return function(object) {
|
|
1240
|
+
return object === source || _baseIsMatch_default(object, source, matchData);
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
var _baseMatches_default = baseMatches;
|
|
1244
|
+
|
|
1245
|
+
// node_modules/lodash-es/get.js
|
|
1246
|
+
function get(object, path, defaultValue) {
|
|
1247
|
+
var result = object == null ? undefined : _baseGet_default(object, path);
|
|
1248
|
+
return result === undefined ? defaultValue : result;
|
|
1249
|
+
}
|
|
1250
|
+
var get_default = get;
|
|
1251
|
+
|
|
1252
|
+
// node_modules/lodash-es/_baseHasIn.js
|
|
1253
|
+
function baseHasIn(object, key) {
|
|
1254
|
+
return object != null && key in Object(object);
|
|
1255
|
+
}
|
|
1256
|
+
var _baseHasIn_default = baseHasIn;
|
|
1257
|
+
|
|
1258
|
+
// node_modules/lodash-es/_hasPath.js
|
|
1259
|
+
function hasPath(object, path, hasFunc) {
|
|
1260
|
+
path = _castPath_default(path, object);
|
|
1261
|
+
var index = -1, length = path.length, result = false;
|
|
1262
|
+
while (++index < length) {
|
|
1263
|
+
var key = _toKey_default(path[index]);
|
|
1264
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
object = object[key];
|
|
1268
|
+
}
|
|
1269
|
+
if (result || ++index != length) {
|
|
1270
|
+
return result;
|
|
1271
|
+
}
|
|
1272
|
+
length = object == null ? 0 : object.length;
|
|
1273
|
+
return !!length && isLength_default(length) && _isIndex_default(key, length) && (isArray_default(object) || isArguments_default(object));
|
|
1274
|
+
}
|
|
1275
|
+
var _hasPath_default = hasPath;
|
|
1276
|
+
|
|
1277
|
+
// node_modules/lodash-es/hasIn.js
|
|
1278
|
+
function hasIn(object, path) {
|
|
1279
|
+
return object != null && _hasPath_default(object, path, _baseHasIn_default);
|
|
1280
|
+
}
|
|
1281
|
+
var hasIn_default = hasIn;
|
|
1282
|
+
|
|
1283
|
+
// node_modules/lodash-es/_baseMatchesProperty.js
|
|
1284
|
+
var COMPARE_PARTIAL_FLAG6 = 1;
|
|
1285
|
+
var COMPARE_UNORDERED_FLAG4 = 2;
|
|
1286
|
+
function baseMatchesProperty(path, srcValue) {
|
|
1287
|
+
if (_isKey_default(path) && _isStrictComparable_default(srcValue)) {
|
|
1288
|
+
return _matchesStrictComparable_default(_toKey_default(path), srcValue);
|
|
1289
|
+
}
|
|
1290
|
+
return function(object) {
|
|
1291
|
+
var objValue = get_default(object, path);
|
|
1292
|
+
return objValue === undefined && objValue === srcValue ? hasIn_default(object, path) : _baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
var _baseMatchesProperty_default = baseMatchesProperty;
|
|
1296
|
+
|
|
1297
|
+
// node_modules/lodash-es/identity.js
|
|
1298
|
+
function identity(value) {
|
|
1299
|
+
return value;
|
|
1300
|
+
}
|
|
1301
|
+
var identity_default = identity;
|
|
1302
|
+
|
|
1303
|
+
// node_modules/lodash-es/_baseProperty.js
|
|
1304
|
+
function baseProperty(key) {
|
|
1305
|
+
return function(object) {
|
|
1306
|
+
return object == null ? undefined : object[key];
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
var _baseProperty_default = baseProperty;
|
|
1310
|
+
|
|
1311
|
+
// node_modules/lodash-es/_basePropertyDeep.js
|
|
1312
|
+
function basePropertyDeep(path) {
|
|
1313
|
+
return function(object) {
|
|
1314
|
+
return _baseGet_default(object, path);
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
var _basePropertyDeep_default = basePropertyDeep;
|
|
1318
|
+
|
|
1319
|
+
// node_modules/lodash-es/property.js
|
|
1320
|
+
function property(path) {
|
|
1321
|
+
return _isKey_default(path) ? _baseProperty_default(_toKey_default(path)) : _basePropertyDeep_default(path);
|
|
1322
|
+
}
|
|
1323
|
+
var property_default = property;
|
|
1324
|
+
|
|
1325
|
+
// node_modules/lodash-es/_baseIteratee.js
|
|
1326
|
+
function baseIteratee(value) {
|
|
1327
|
+
if (typeof value == "function") {
|
|
1328
|
+
return value;
|
|
1329
|
+
}
|
|
1330
|
+
if (value == null) {
|
|
1331
|
+
return identity_default;
|
|
1332
|
+
}
|
|
1333
|
+
if (typeof value == "object") {
|
|
1334
|
+
return isArray_default(value) ? _baseMatchesProperty_default(value[0], value[1]) : _baseMatches_default(value);
|
|
1335
|
+
}
|
|
1336
|
+
return property_default(value);
|
|
1337
|
+
}
|
|
1338
|
+
var _baseIteratee_default = baseIteratee;
|
|
1339
|
+
|
|
1340
|
+
// node_modules/lodash-es/_createBaseFor.js
|
|
1341
|
+
function createBaseFor(fromRight) {
|
|
1342
|
+
return function(object, iteratee, keysFunc) {
|
|
1343
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1344
|
+
while (length--) {
|
|
1345
|
+
var key = props[fromRight ? length : ++index];
|
|
1346
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
return object;
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
var _createBaseFor_default = createBaseFor;
|
|
1354
|
+
|
|
1355
|
+
// node_modules/lodash-es/_baseFor.js
|
|
1356
|
+
var baseFor = _createBaseFor_default();
|
|
1357
|
+
var _baseFor_default = baseFor;
|
|
1358
|
+
|
|
1359
|
+
// node_modules/lodash-es/_baseForOwn.js
|
|
1360
|
+
function baseForOwn(object, iteratee) {
|
|
1361
|
+
return object && _baseFor_default(object, iteratee, keys_default);
|
|
1362
|
+
}
|
|
1363
|
+
var _baseForOwn_default = baseForOwn;
|
|
1364
|
+
|
|
1365
|
+
// node_modules/lodash-es/_createBaseEach.js
|
|
1366
|
+
function createBaseEach(eachFunc, fromRight) {
|
|
1367
|
+
return function(collection, iteratee) {
|
|
1368
|
+
if (collection == null) {
|
|
1369
|
+
return collection;
|
|
1370
|
+
}
|
|
1371
|
+
if (!isArrayLike_default(collection)) {
|
|
1372
|
+
return eachFunc(collection, iteratee);
|
|
1373
|
+
}
|
|
1374
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
|
|
1375
|
+
while (fromRight ? index-- : ++index < length) {
|
|
1376
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
return collection;
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
var _createBaseEach_default = createBaseEach;
|
|
1384
|
+
|
|
1385
|
+
// node_modules/lodash-es/_baseEach.js
|
|
1386
|
+
var baseEach = _createBaseEach_default(_baseForOwn_default);
|
|
1387
|
+
var _baseEach_default = baseEach;
|
|
1388
|
+
|
|
1389
|
+
// node_modules/lodash-es/_baseMap.js
|
|
1390
|
+
function baseMap(collection, iteratee) {
|
|
1391
|
+
var index = -1, result = isArrayLike_default(collection) ? Array(collection.length) : [];
|
|
1392
|
+
_baseEach_default(collection, function(value, key, collection2) {
|
|
1393
|
+
result[++index] = iteratee(value, key, collection2);
|
|
1394
|
+
});
|
|
1395
|
+
return result;
|
|
1396
|
+
}
|
|
1397
|
+
var _baseMap_default = baseMap;
|
|
1398
|
+
|
|
1399
|
+
// node_modules/lodash-es/_baseSortBy.js
|
|
1400
|
+
function baseSortBy(array, comparer) {
|
|
1401
|
+
var length = array.length;
|
|
1402
|
+
array.sort(comparer);
|
|
1403
|
+
while (length--) {
|
|
1404
|
+
array[length] = array[length].value;
|
|
1405
|
+
}
|
|
1406
|
+
return array;
|
|
1407
|
+
}
|
|
1408
|
+
var _baseSortBy_default = baseSortBy;
|
|
1409
|
+
|
|
1410
|
+
// node_modules/lodash-es/_compareAscending.js
|
|
1411
|
+
function compareAscending(value, other) {
|
|
1412
|
+
if (value !== other) {
|
|
1413
|
+
var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol_default(value);
|
|
1414
|
+
var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol_default(other);
|
|
1415
|
+
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
1416
|
+
return 1;
|
|
1417
|
+
}
|
|
1418
|
+
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
|
1419
|
+
return -1;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return 0;
|
|
1423
|
+
}
|
|
1424
|
+
var _compareAscending_default = compareAscending;
|
|
1425
|
+
|
|
1426
|
+
// node_modules/lodash-es/_compareMultiple.js
|
|
1427
|
+
function compareMultiple(object, other, orders) {
|
|
1428
|
+
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
1429
|
+
while (++index < length) {
|
|
1430
|
+
var result = _compareAscending_default(objCriteria[index], othCriteria[index]);
|
|
1431
|
+
if (result) {
|
|
1432
|
+
if (index >= ordersLength) {
|
|
1433
|
+
return result;
|
|
1434
|
+
}
|
|
1435
|
+
var order = orders[index];
|
|
1436
|
+
return result * (order == "desc" ? -1 : 1);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
return object.index - other.index;
|
|
1440
|
+
}
|
|
1441
|
+
var _compareMultiple_default = compareMultiple;
|
|
1442
|
+
|
|
1443
|
+
// node_modules/lodash-es/_baseOrderBy.js
|
|
1444
|
+
function baseOrderBy(collection, iteratees, orders) {
|
|
1445
|
+
if (iteratees.length) {
|
|
1446
|
+
iteratees = _arrayMap_default(iteratees, function(iteratee) {
|
|
1447
|
+
if (isArray_default(iteratee)) {
|
|
1448
|
+
return function(value) {
|
|
1449
|
+
return _baseGet_default(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
return iteratee;
|
|
1453
|
+
});
|
|
1454
|
+
} else {
|
|
1455
|
+
iteratees = [identity_default];
|
|
1456
|
+
}
|
|
1457
|
+
var index = -1;
|
|
1458
|
+
iteratees = _arrayMap_default(iteratees, _baseUnary_default(_baseIteratee_default));
|
|
1459
|
+
var result = _baseMap_default(collection, function(value, key, collection2) {
|
|
1460
|
+
var criteria = _arrayMap_default(iteratees, function(iteratee) {
|
|
1461
|
+
return iteratee(value);
|
|
9
1462
|
});
|
|
1463
|
+
return { criteria, index: ++index, value };
|
|
1464
|
+
});
|
|
1465
|
+
return _baseSortBy_default(result, function(object, other) {
|
|
1466
|
+
return _compareMultiple_default(object, other, orders);
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
var _baseOrderBy_default = baseOrderBy;
|
|
1470
|
+
|
|
1471
|
+
// node_modules/lodash-es/orderBy.js
|
|
1472
|
+
function orderBy(collection, iteratees, orders, guard) {
|
|
1473
|
+
if (collection == null) {
|
|
1474
|
+
return [];
|
|
1475
|
+
}
|
|
1476
|
+
if (!isArray_default(iteratees)) {
|
|
1477
|
+
iteratees = iteratees == null ? [] : [iteratees];
|
|
1478
|
+
}
|
|
1479
|
+
orders = guard ? undefined : orders;
|
|
1480
|
+
if (!isArray_default(orders)) {
|
|
1481
|
+
orders = orders == null ? [] : [orders];
|
|
1482
|
+
}
|
|
1483
|
+
return _baseOrderBy_default(collection, iteratees, orders);
|
|
1484
|
+
}
|
|
1485
|
+
var orderBy_default = orderBy;
|
|
1486
|
+
// node_modules/lodash-es/_baseFindIndex.js
|
|
1487
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
1488
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
1489
|
+
while (fromRight ? index-- : ++index < length) {
|
|
1490
|
+
if (predicate(array[index], index, array)) {
|
|
1491
|
+
return index;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
return -1;
|
|
1495
|
+
}
|
|
1496
|
+
var _baseFindIndex_default = baseFindIndex;
|
|
1497
|
+
|
|
1498
|
+
// node_modules/lodash-es/_baseIsNaN.js
|
|
1499
|
+
function baseIsNaN(value) {
|
|
1500
|
+
return value !== value;
|
|
1501
|
+
}
|
|
1502
|
+
var _baseIsNaN_default = baseIsNaN;
|
|
1503
|
+
|
|
1504
|
+
// node_modules/lodash-es/_strictIndexOf.js
|
|
1505
|
+
function strictIndexOf(array, value, fromIndex) {
|
|
1506
|
+
var index = fromIndex - 1, length = array.length;
|
|
1507
|
+
while (++index < length) {
|
|
1508
|
+
if (array[index] === value) {
|
|
1509
|
+
return index;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
return -1;
|
|
1513
|
+
}
|
|
1514
|
+
var _strictIndexOf_default = strictIndexOf;
|
|
1515
|
+
|
|
1516
|
+
// node_modules/lodash-es/_baseIndexOf.js
|
|
1517
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
1518
|
+
return value === value ? _strictIndexOf_default(array, value, fromIndex) : _baseFindIndex_default(array, _baseIsNaN_default, fromIndex);
|
|
1519
|
+
}
|
|
1520
|
+
var _baseIndexOf_default = baseIndexOf;
|
|
1521
|
+
|
|
1522
|
+
// node_modules/lodash-es/_arrayIncludes.js
|
|
1523
|
+
function arrayIncludes(array, value) {
|
|
1524
|
+
var length = array == null ? 0 : array.length;
|
|
1525
|
+
return !!length && _baseIndexOf_default(array, value, 0) > -1;
|
|
1526
|
+
}
|
|
1527
|
+
var _arrayIncludes_default = arrayIncludes;
|
|
1528
|
+
|
|
1529
|
+
// node_modules/lodash-es/_arrayIncludesWith.js
|
|
1530
|
+
function arrayIncludesWith(array, value, comparator) {
|
|
1531
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
1532
|
+
while (++index < length) {
|
|
1533
|
+
if (comparator(value, array[index])) {
|
|
1534
|
+
return true;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
return false;
|
|
1538
|
+
}
|
|
1539
|
+
var _arrayIncludesWith_default = arrayIncludesWith;
|
|
1540
|
+
|
|
1541
|
+
// node_modules/lodash-es/noop.js
|
|
1542
|
+
function noop() {}
|
|
1543
|
+
var noop_default = noop;
|
|
1544
|
+
|
|
1545
|
+
// node_modules/lodash-es/_createSet.js
|
|
1546
|
+
var INFINITY3 = 1 / 0;
|
|
1547
|
+
var createSet = !(_Set_default && 1 / _setToArray_default(new _Set_default([, -0]))[1] == INFINITY3) ? noop_default : function(values) {
|
|
1548
|
+
return new _Set_default(values);
|
|
1549
|
+
};
|
|
1550
|
+
var _createSet_default = createSet;
|
|
1551
|
+
|
|
1552
|
+
// node_modules/lodash-es/_baseUniq.js
|
|
1553
|
+
var LARGE_ARRAY_SIZE2 = 200;
|
|
1554
|
+
function baseUniq(array, iteratee, comparator) {
|
|
1555
|
+
var index = -1, includes = _arrayIncludes_default, length = array.length, isCommon = true, result = [], seen = result;
|
|
1556
|
+
if (comparator) {
|
|
1557
|
+
isCommon = false;
|
|
1558
|
+
includes = _arrayIncludesWith_default;
|
|
1559
|
+
} else if (length >= LARGE_ARRAY_SIZE2) {
|
|
1560
|
+
var set = iteratee ? null : _createSet_default(array);
|
|
1561
|
+
if (set) {
|
|
1562
|
+
return _setToArray_default(set);
|
|
1563
|
+
}
|
|
1564
|
+
isCommon = false;
|
|
1565
|
+
includes = _cacheHas_default;
|
|
1566
|
+
seen = new _SetCache_default;
|
|
1567
|
+
} else {
|
|
1568
|
+
seen = iteratee ? [] : result;
|
|
1569
|
+
}
|
|
1570
|
+
outer:
|
|
1571
|
+
while (++index < length) {
|
|
1572
|
+
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|
1573
|
+
value = comparator || value !== 0 ? value : 0;
|
|
1574
|
+
if (isCommon && computed === computed) {
|
|
1575
|
+
var seenIndex = seen.length;
|
|
1576
|
+
while (seenIndex--) {
|
|
1577
|
+
if (seen[seenIndex] === computed) {
|
|
1578
|
+
continue outer;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
if (iteratee) {
|
|
1582
|
+
seen.push(computed);
|
|
1583
|
+
}
|
|
1584
|
+
result.push(value);
|
|
1585
|
+
} else if (!includes(seen, computed, comparator)) {
|
|
1586
|
+
if (seen !== result) {
|
|
1587
|
+
seen.push(computed);
|
|
1588
|
+
}
|
|
1589
|
+
result.push(value);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
return result;
|
|
1593
|
+
}
|
|
1594
|
+
var _baseUniq_default = baseUniq;
|
|
1595
|
+
|
|
1596
|
+
// node_modules/lodash-es/uniqBy.js
|
|
1597
|
+
function uniqBy(array, iteratee) {
|
|
1598
|
+
return array && array.length ? _baseUniq_default(array, _baseIteratee_default(iteratee, 2)) : [];
|
|
1599
|
+
}
|
|
1600
|
+
var uniqBy_default = uniqBy;
|
|
1601
|
+
// src/categories.ts
|
|
1602
|
+
var GENRE_CATEGORIES = {
|
|
1603
|
+
"science-fiction": { fr: "21229020031", com: "18580628011" },
|
|
1604
|
+
fantasy: { fr: "21229021031", com: "18580607011" },
|
|
1605
|
+
"science-fiction-fantasy": { fr: "21228885031", com: "18580606011" },
|
|
1606
|
+
thriller: { fr: "21228906031", com: "18574449011" },
|
|
1607
|
+
mystery: { fr: "21228905031", com: "18574427011" },
|
|
1608
|
+
horror: { fr: "21229011031", com: "18573211011" },
|
|
1609
|
+
romance: { fr: "21228893031", com: "18580518011" },
|
|
1610
|
+
"historical-fiction": { fr: "21229010031" },
|
|
1611
|
+
"literary-fiction": { fr: "21228884031", com: "18574784011" },
|
|
1612
|
+
biography: { fr: "21228881031", com: "18571951011" },
|
|
1613
|
+
history: { fr: "21228890031" },
|
|
1614
|
+
business: { fr: "21228882031", com: "18571961011" },
|
|
1615
|
+
"self-help": { fr: "21228892031", com: "18571967011" },
|
|
1616
|
+
science: { fr: "21228897031", com: "18571997011" },
|
|
1617
|
+
children: { fr: "21228877031", com: "18572091011" },
|
|
1618
|
+
"young-adult": { fr: "21228895031" },
|
|
1619
|
+
comedy: { fr: "34003928031", com: "18572049011" },
|
|
1620
|
+
erotica: { fr: "21228894031", com: "18573267011" },
|
|
1621
|
+
religion: { fr: "21228880031", com: "18574606011" },
|
|
1622
|
+
sports: { fr: "21228879031", com: "18574713011" },
|
|
1623
|
+
travel: { fr: "21228891031", com: "18574721011" },
|
|
1624
|
+
lgbtq: { fr: "21228883031", com: "18573939011" },
|
|
1625
|
+
"science-fiction/adventure": { fr: "21229681031", com: "18580629011" },
|
|
1626
|
+
"science-fiction/adaptations": { fr: "21229683031" },
|
|
1627
|
+
"science-fiction/cyberpunk": { fr: "21229684031", com: "18580633011" },
|
|
1628
|
+
"science-fiction/dystopian": { fr: "21229685031", com: "18580634011" },
|
|
1629
|
+
"science-fiction/first-contact": { fr: "21229682031", com: "18580635011" },
|
|
1630
|
+
"science-fiction/galactic-empire": { fr: "21229693031", com: "18580636011" },
|
|
1631
|
+
"science-fiction/genetic-engineering": { fr: "21229686031", com: "18580637011" },
|
|
1632
|
+
"science-fiction/military": { fr: "21229688031", com: "18580643011" },
|
|
1633
|
+
"science-fiction/post-apocalyptic": { fr: "21229687031", com: "18580645011" },
|
|
1634
|
+
"science-fiction/space-exploration": { fr: "21229689031", com: "18580647011" },
|
|
1635
|
+
"science-fiction/space-opera": { fr: "21229694031", com: "18580648011" },
|
|
1636
|
+
"fantasy/action-adventure": { fr: "21229712031", com: "18580608011" },
|
|
1637
|
+
"fantasy/adaptations": { fr: "21229708031" },
|
|
1638
|
+
"fantasy/dragons": { fr: "21229709031", com: "18580612011" },
|
|
1639
|
+
"fantasy/epic": { fr: "21229701031", com: "18580614011" },
|
|
1640
|
+
"fantasy/historical": { fr: "21229700031", com: "18580616011" },
|
|
1641
|
+
"fantasy/urban-paranormal": { fr: "21229711031", com: "18580621011" },
|
|
1642
|
+
"thriller/suspense": { fr: "21229158031", com: "18574450011" },
|
|
1643
|
+
"thriller/psychological": { fr: "21229165031", com: "18574459011" },
|
|
1644
|
+
"thriller/domestic": { fr: "21229163031", com: "18574455011" },
|
|
1645
|
+
"thriller/historical": { fr: "21229168031", com: "18574456011" },
|
|
1646
|
+
"mystery/amateur-sleuth": { fr: "21229145031", com: "18574430011" },
|
|
1647
|
+
"mystery/detective": { fr: "21229148031" },
|
|
1648
|
+
"mystery/historical": { fr: "21229155031", com: "18574435011" },
|
|
1649
|
+
"mystery/noir": { fr: "21229177031", com: "18574434011" },
|
|
1650
|
+
"mystery/private-investigator": { fr: "21229148031", com: "18574439011" },
|
|
1651
|
+
"mystery/traditional": { fr: "21229152031", com: "18574443011" },
|
|
1652
|
+
"romance/action-adventure": { fr: "21229096031" },
|
|
1653
|
+
"romance/comedy": { fr: "21229087031" },
|
|
1654
|
+
"romance/contemporary": { fr: "21230152031" },
|
|
1655
|
+
"romance/fantasy": { fr: "21229095031" },
|
|
1656
|
+
"romance/historical": { fr: "21229093031" },
|
|
1657
|
+
"romance/paranormal": { fr: "21229088031" },
|
|
1658
|
+
"romance/science-fiction": { fr: "21229085031" },
|
|
1659
|
+
"romance/sports": { fr: "21229086031" },
|
|
1660
|
+
"romance/suspense": { fr: "21229090031" },
|
|
1661
|
+
"literary-fiction/action-adventure": { fr: "21230085031" },
|
|
1662
|
+
"literary-fiction/classics": { fr: "21229007031" },
|
|
1663
|
+
"literary-fiction/coming-of-age": { fr: "21230090031" },
|
|
1664
|
+
"literary-fiction/contemporary": { fr: "21229657031" },
|
|
1665
|
+
"literary-fiction/drama": { fr: "21229017031" },
|
|
1666
|
+
"literary-fiction/family-life": { fr: "21229670031" },
|
|
1667
|
+
"literary-fiction/historical": { fr: "21229010031" },
|
|
1668
|
+
"literary-fiction/sagas": { fr: "21229654031" },
|
|
1669
|
+
"literary-fiction/sea-adventures": { fr: "21229673031" },
|
|
1670
|
+
"literary-fiction/world-literature": { fr: "21229018031" },
|
|
1671
|
+
"biography/entertainment": { fr: "21228985031" },
|
|
1672
|
+
"history/europe": { fr: "21229067031" },
|
|
1673
|
+
"children/action-adventure": { fr: "21228913031" },
|
|
1674
|
+
"young-adult/literary-fiction": { fr: "21229110031" },
|
|
1675
|
+
"young-adult/romance": { fr: "21229117031" },
|
|
1676
|
+
"young-adult/science-fiction-fantasy": { fr: "21229103031" },
|
|
1677
|
+
"young-adult/thriller": { fr: "21229114031" }
|
|
1678
|
+
};
|
|
1679
|
+
var resolveGenreId = (genre, locale) => {
|
|
1680
|
+
const id = GENRE_CATEGORIES[genre]?.[locale];
|
|
1681
|
+
if (!id) {
|
|
1682
|
+
throw new Error(`Genre "${genre}" is not mapped for locale "${locale}". Use categoryId directly or contribute the mapping.`);
|
|
1683
|
+
}
|
|
1684
|
+
return id;
|
|
10
1685
|
};
|
|
11
1686
|
|
|
12
1687
|
// src/client.ts
|
|
@@ -27,16 +1702,16 @@ var AUDIBLE_LOCALES = {
|
|
|
27
1702
|
};
|
|
28
1703
|
|
|
29
1704
|
// src/utils.ts
|
|
30
|
-
import { Buffer as
|
|
1705
|
+
import { Buffer as Buffer3 } from "node:buffer";
|
|
31
1706
|
var base64url = (buffer) => buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
32
1707
|
var base64nopad = (buffer) => buffer.toString("base64").replace(/=+$/, "");
|
|
33
|
-
var toHexString = (input) =>
|
|
1708
|
+
var toHexString = (input) => Buffer3.from(input, "utf-8").toString("hex");
|
|
34
1709
|
|
|
35
1710
|
// src/client.ts
|
|
36
1711
|
var DEVICE_TYPE = "A2CZJZGLK2JJVM";
|
|
37
1712
|
var APP_VERSION = "3.56.2";
|
|
38
1713
|
var SOFTWARE_VERSION = "35602678";
|
|
39
|
-
var
|
|
1714
|
+
var login = async (locale) => {
|
|
40
1715
|
const config = AUDIBLE_LOCALES[locale];
|
|
41
1716
|
const codeVerifier = base64url(randomBytes(32));
|
|
42
1717
|
const codeChallenge = base64url(createHash("sha256").update(codeVerifier).digest());
|
|
@@ -92,7 +1767,7 @@ var generateLoginUrl = async (locale) => {
|
|
|
92
1767
|
];
|
|
93
1768
|
return { loginUrl, session, cookies };
|
|
94
1769
|
};
|
|
95
|
-
var
|
|
1770
|
+
var register = async (authorizationCode, session) => {
|
|
96
1771
|
const config = AUDIBLE_LOCALES[session.locale];
|
|
97
1772
|
const clientId = toHexString(`${session.serial}#${DEVICE_TYPE}`);
|
|
98
1773
|
const body = {
|
|
@@ -139,7 +1814,7 @@ var registerDevice = async (authorizationCode, session) => {
|
|
|
139
1814
|
expiresAt: new Date(Date.now() + Number(bearer.expires_in) * 1000)
|
|
140
1815
|
};
|
|
141
1816
|
};
|
|
142
|
-
var
|
|
1817
|
+
var refresh = async (credentials) => {
|
|
143
1818
|
const config = AUDIBLE_LOCALES[credentials.locale];
|
|
144
1819
|
const response = await fetch(`https://api.amazon.${config.domain}/auth/token`, {
|
|
145
1820
|
method: "POST",
|
|
@@ -162,6 +1837,7 @@ var refreshAccessToken = async (credentials) => {
|
|
|
162
1837
|
expiresAt: new Date(Date.now() + data.expires_in * 1000)
|
|
163
1838
|
};
|
|
164
1839
|
};
|
|
1840
|
+
|
|
165
1841
|
// node_modules/zod/v3/external.js
|
|
166
1842
|
var exports_external = {};
|
|
167
1843
|
__export(exports_external, {
|
|
@@ -305,13 +1981,13 @@ var util;
|
|
|
305
1981
|
});
|
|
306
1982
|
};
|
|
307
1983
|
util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
308
|
-
const
|
|
1984
|
+
const keys2 = [];
|
|
309
1985
|
for (const key in object) {
|
|
310
1986
|
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
311
|
-
|
|
1987
|
+
keys2.push(key);
|
|
312
1988
|
}
|
|
313
1989
|
}
|
|
314
|
-
return
|
|
1990
|
+
return keys2;
|
|
315
1991
|
};
|
|
316
1992
|
util2.find = (arr, checker) => {
|
|
317
1993
|
for (const item of arr) {
|
|
@@ -2546,8 +4222,8 @@ class ZodObject extends ZodType {
|
|
|
2546
4222
|
if (this._cached !== null)
|
|
2547
4223
|
return this._cached;
|
|
2548
4224
|
const shape = this._def.shape();
|
|
2549
|
-
const
|
|
2550
|
-
this._cached = { shape, keys };
|
|
4225
|
+
const keys2 = util.objectKeys(shape);
|
|
4226
|
+
this._cached = { shape, keys: keys2 };
|
|
2551
4227
|
return this._cached;
|
|
2552
4228
|
}
|
|
2553
4229
|
_parse(input) {
|
|
@@ -4136,26 +5812,83 @@ var coerce = {
|
|
|
4136
5812
|
};
|
|
4137
5813
|
var NEVER = INVALID;
|
|
4138
5814
|
// src/schemas.ts
|
|
5815
|
+
var nullToUndefined = (v) => v ?? undefined;
|
|
5816
|
+
var optionalString = exports_external.string().nullish().transform(nullToUndefined);
|
|
5817
|
+
var ratingDistributionSchema = exports_external.object({
|
|
5818
|
+
average_rating: exports_external.number(),
|
|
5819
|
+
display_average_rating: exports_external.string().default("0"),
|
|
5820
|
+
display_stars: exports_external.number().default(0),
|
|
5821
|
+
num_ratings: exports_external.number(),
|
|
5822
|
+
num_five_star_ratings: exports_external.number().default(0),
|
|
5823
|
+
num_four_star_ratings: exports_external.number().default(0),
|
|
5824
|
+
num_three_star_ratings: exports_external.number().default(0),
|
|
5825
|
+
num_two_star_ratings: exports_external.number().default(0),
|
|
5826
|
+
num_one_star_ratings: exports_external.number().default(0)
|
|
5827
|
+
});
|
|
5828
|
+
var audibleRatingSchema = exports_external.object({
|
|
5829
|
+
num_reviews: exports_external.number().default(0),
|
|
5830
|
+
overall_distribution: ratingDistributionSchema.nullish(),
|
|
5831
|
+
performance_distribution: ratingDistributionSchema.nullish(),
|
|
5832
|
+
story_distribution: ratingDistributionSchema.nullish()
|
|
5833
|
+
}).nullish();
|
|
5834
|
+
var categoryLadderSchema = exports_external.object({
|
|
5835
|
+
root: exports_external.string().default("Genres"),
|
|
5836
|
+
ladder: exports_external.array(exports_external.object({
|
|
5837
|
+
id: exports_external.string(),
|
|
5838
|
+
name: exports_external.string()
|
|
5839
|
+
})).default([])
|
|
5840
|
+
});
|
|
5841
|
+
var relationshipSchema = exports_external.object({
|
|
5842
|
+
asin: exports_external.string(),
|
|
5843
|
+
relationship_to_product: optionalString,
|
|
5844
|
+
relationship_type: optionalString,
|
|
5845
|
+
title: optionalString,
|
|
5846
|
+
sort: optionalString,
|
|
5847
|
+
url: optionalString
|
|
5848
|
+
});
|
|
4139
5849
|
var audibleRawItemSchema = exports_external.object({
|
|
4140
5850
|
asin: exports_external.string().min(1),
|
|
4141
5851
|
title: exports_external.string().min(1),
|
|
5852
|
+
subtitle: optionalString,
|
|
5853
|
+
isbn: optionalString,
|
|
5854
|
+
sku: optionalString,
|
|
4142
5855
|
authors: exports_external.array(exports_external.object({ name: exports_external.string() })).default([]),
|
|
4143
5856
|
narrators: exports_external.array(exports_external.object({ name: exports_external.string() })).default([]),
|
|
4144
5857
|
runtime_length_min: exports_external.number().nonnegative().default(0),
|
|
4145
|
-
publisher_name:
|
|
4146
|
-
language:
|
|
4147
|
-
release_date:
|
|
4148
|
-
|
|
5858
|
+
publisher_name: optionalString,
|
|
5859
|
+
language: optionalString,
|
|
5860
|
+
release_date: optionalString,
|
|
5861
|
+
publisher_summary: optionalString,
|
|
5862
|
+
extended_product_description: optionalString,
|
|
5863
|
+
merchandising_summary: optionalString,
|
|
5864
|
+
copyright: optionalString,
|
|
5865
|
+
format_type: optionalString,
|
|
5866
|
+
content_type: optionalString,
|
|
5867
|
+
content_delivery_type: optionalString,
|
|
5868
|
+
program_participation: optionalString,
|
|
5869
|
+
product_images: exports_external.record(exports_external.string(), exports_external.string()).nullish().transform((v) => v ?? {}),
|
|
5870
|
+
social_media_images: exports_external.record(exports_external.string(), exports_external.string()).nullish().transform((v) => v ?? {}),
|
|
4149
5871
|
series: exports_external.array(exports_external.object({
|
|
4150
5872
|
asin: exports_external.string(),
|
|
4151
5873
|
title: exports_external.string(),
|
|
4152
|
-
sequence:
|
|
5874
|
+
sequence: optionalString
|
|
4153
5875
|
})).nullish().transform((v) => v ?? []),
|
|
5876
|
+
category_ladders: exports_external.array(categoryLadderSchema).nullish().transform((v) => v ?? []),
|
|
5877
|
+
platinum_keywords: exports_external.array(exports_external.string()).nullish().transform((v) => v ?? []),
|
|
5878
|
+
thesaurus_subject_keywords: exports_external.array(exports_external.string()).nullish().transform((v) => v ?? []),
|
|
5879
|
+
rating: audibleRatingSchema,
|
|
4154
5880
|
listening_status: exports_external.object({
|
|
4155
5881
|
is_finished: exports_external.boolean().optional(),
|
|
4156
5882
|
percent_complete: exports_external.number().optional(),
|
|
4157
|
-
finished_at_timestamp: exports_external.string().nullish()
|
|
4158
|
-
|
|
5883
|
+
finished_at_timestamp: exports_external.string().nullish(),
|
|
5884
|
+
time_remaining_seconds: exports_external.number().optional()
|
|
5885
|
+
}).nullish().transform(nullToUndefined),
|
|
5886
|
+
purchase_date: optionalString,
|
|
5887
|
+
library_status: exports_external.object({
|
|
5888
|
+
date_added: exports_external.string().nullish()
|
|
5889
|
+
}).nullish().transform(nullToUndefined),
|
|
5890
|
+
relationships: exports_external.array(relationshipSchema).nullish().transform((v) => v ?? []),
|
|
5891
|
+
is_adult_product: exports_external.boolean().nullish().transform((v) => v ?? false)
|
|
4159
5892
|
});
|
|
4160
5893
|
|
|
4161
5894
|
// src/signing.ts
|
|
@@ -4177,73 +5910,161 @@ ${credentials.adpToken}`;
|
|
|
4177
5910
|
};
|
|
4178
5911
|
};
|
|
4179
5912
|
|
|
4180
|
-
// src/
|
|
4181
|
-
var
|
|
5913
|
+
// src/fetch.ts
|
|
5914
|
+
var PAGE_SIZE = 50;
|
|
5915
|
+
var REFRESH_BUFFER_MS = 5 * 60 * 1000;
|
|
5916
|
+
var ensureFresh = async (credentials) => credentials.expiresAt.getTime() - Date.now() < REFRESH_BUFFER_MS ? refresh(credentials) : credentials;
|
|
4182
5917
|
var audibleFetch = async (path, credentials, query) => {
|
|
4183
|
-
const
|
|
5918
|
+
const fresh = await ensureFresh(credentials);
|
|
5919
|
+
const config = AUDIBLE_LOCALES[fresh.locale];
|
|
4184
5920
|
const fullPath = `/1.0${path}`;
|
|
4185
5921
|
const queryString = query ? `?${Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&")}` : "";
|
|
4186
5922
|
const signPath = `${fullPath}${queryString}`;
|
|
4187
|
-
const headers = signRequest("GET", signPath, "",
|
|
4188
|
-
const
|
|
4189
|
-
|
|
4190
|
-
for (const [k, v] of Object.entries(query)) {
|
|
4191
|
-
url.searchParams.set(k, v);
|
|
4192
|
-
}
|
|
4193
|
-
}
|
|
4194
|
-
const response = await fetch(url.toString(), { headers });
|
|
5923
|
+
const headers = signRequest("GET", signPath, "", fresh);
|
|
5924
|
+
const fetchUrl = `https://api.audible.${config.domain}${fullPath}${queryString}`;
|
|
5925
|
+
const response = await fetch(fetchUrl, { headers });
|
|
4195
5926
|
if (!response.ok) {
|
|
4196
5927
|
throw new Error(`Audible API error: ${response.status} ${response.statusText} (${path})`);
|
|
4197
5928
|
}
|
|
4198
|
-
return await response.json();
|
|
5929
|
+
return { data: await response.json(), credentials: fresh };
|
|
4199
5930
|
};
|
|
4200
|
-
var
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
coverUrl: item.product_images?.["500"] ?? item.product_images?.["252"],
|
|
4212
|
-
series: item.series[0] ? {
|
|
4213
|
-
name: item.series[0].title,
|
|
4214
|
-
position: item.series[0].sequence ? Number(item.series[0].sequence) : undefined
|
|
4215
|
-
} : undefined,
|
|
4216
|
-
finishedAt: item.listening_status?.finished_at_timestamp ? new Date(item.listening_status.finished_at_timestamp) : undefined
|
|
4217
|
-
};
|
|
5931
|
+
var extractItems = (response) => Array.isArray(response.items) ? response.items : Array.isArray(response.products) ? response.products : [];
|
|
5932
|
+
var toRatingDistribution = (dist) => ({
|
|
5933
|
+
averageRating: dist.average_rating,
|
|
5934
|
+
displayAverageRating: dist.display_average_rating,
|
|
5935
|
+
displayStars: dist.display_stars,
|
|
5936
|
+
numRatings: dist.num_ratings,
|
|
5937
|
+
numFiveStarRatings: dist.num_five_star_ratings,
|
|
5938
|
+
numFourStarRatings: dist.num_four_star_ratings,
|
|
5939
|
+
numThreeStarRatings: dist.num_three_star_ratings,
|
|
5940
|
+
numTwoStarRatings: dist.num_two_star_ratings,
|
|
5941
|
+
numOneStarRatings: dist.num_one_star_ratings
|
|
4218
5942
|
});
|
|
4219
|
-
var
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
5943
|
+
var toRating = (raw) => raw ? {
|
|
5944
|
+
numReviews: raw.num_reviews,
|
|
5945
|
+
overallDistribution: raw.overall_distribution ? toRatingDistribution(raw.overall_distribution) : undefined,
|
|
5946
|
+
performanceDistribution: raw.performance_distribution ? toRatingDistribution(raw.performance_distribution) : undefined,
|
|
5947
|
+
storyDistribution: raw.story_distribution ? toRatingDistribution(raw.story_distribution) : undefined
|
|
5948
|
+
} : undefined;
|
|
5949
|
+
var toAudibleItem = (item) => ({
|
|
5950
|
+
asin: item.asin,
|
|
5951
|
+
title: item.title,
|
|
5952
|
+
subtitle: item.subtitle,
|
|
5953
|
+
isbn: item.isbn,
|
|
5954
|
+
sku: item.sku,
|
|
5955
|
+
authors: item.authors.map(({ name }) => name),
|
|
5956
|
+
narrators: item.narrators.map(({ name }) => name),
|
|
5957
|
+
durationMinutes: item.runtime_length_min,
|
|
5958
|
+
publisher: item.publisher_name,
|
|
5959
|
+
language: item.language,
|
|
5960
|
+
releaseDate: item.release_date ? new Date(item.release_date) : undefined,
|
|
5961
|
+
coverUrl: item.product_images["500"] ?? item.product_images["252"],
|
|
5962
|
+
summary: item.publisher_summary,
|
|
5963
|
+
description: item.extended_product_description,
|
|
5964
|
+
merchandisingSummary: item.merchandising_summary,
|
|
5965
|
+
copyright: item.copyright,
|
|
5966
|
+
formatType: item.format_type,
|
|
5967
|
+
contentType: item.content_type,
|
|
5968
|
+
contentDeliveryType: item.content_delivery_type,
|
|
5969
|
+
programParticipation: item.program_participation,
|
|
5970
|
+
series: item.series[0] ? {
|
|
5971
|
+
name: item.series[0].title,
|
|
5972
|
+
position: item.series[0].sequence ? Number(item.series[0].sequence) : undefined
|
|
5973
|
+
} : undefined,
|
|
5974
|
+
categories: item.category_ladders.map((ladder) => ({
|
|
5975
|
+
root: ladder.root,
|
|
5976
|
+
categories: ladder.ladder.map(({ id, name }) => ({ id, name }))
|
|
5977
|
+
})),
|
|
5978
|
+
keywords: [...item.platinum_keywords, ...item.thesaurus_subject_keywords],
|
|
5979
|
+
rating: toRating(item.rating),
|
|
5980
|
+
listeningStatus: item.listening_status ? {
|
|
5981
|
+
finishedAt: item.listening_status.finished_at_timestamp ? new Date(item.listening_status.finished_at_timestamp) : undefined,
|
|
5982
|
+
isFinished: item.listening_status.is_finished,
|
|
5983
|
+
percentComplete: item.listening_status.percent_complete,
|
|
5984
|
+
timeRemainingSeconds: item.listening_status.time_remaining_seconds
|
|
5985
|
+
} : undefined,
|
|
5986
|
+
purchaseDate: item.purchase_date ? new Date(item.purchase_date) : undefined,
|
|
5987
|
+
dateAdded: item.library_status?.date_added ? new Date(item.library_status.date_added) : undefined,
|
|
5988
|
+
relationships: item.relationships.map((rel) => ({
|
|
5989
|
+
asin: rel.asin,
|
|
5990
|
+
relationshipToProduct: rel.relationship_to_product ?? "",
|
|
5991
|
+
relationshipType: rel.relationship_type ?? "",
|
|
5992
|
+
title: rel.title,
|
|
5993
|
+
sort: rel.sort,
|
|
5994
|
+
url: rel.url
|
|
5995
|
+
})),
|
|
5996
|
+
isAdultProduct: item.is_adult_product,
|
|
5997
|
+
productImages: item.product_images,
|
|
5998
|
+
socialMediaImages: item.social_media_images
|
|
5999
|
+
});
|
|
6000
|
+
var parseItems = (items) => items.map((raw) => toAudibleItem(audibleRawItemSchema.parse(raw)));
|
|
6001
|
+
var fetchAllPages = async (path, credentials, responseGroups, accumulated = [], page = 1) => {
|
|
6002
|
+
const { data: response, credentials: fresh } = await audibleFetch(path, credentials, {
|
|
6003
|
+
response_groups: responseGroups,
|
|
6004
|
+
num_results: String(PAGE_SIZE),
|
|
6005
|
+
page: String(page)
|
|
6006
|
+
});
|
|
6007
|
+
const rawItems = extractItems(response);
|
|
6008
|
+
const items = [...accumulated, ...parseItems(rawItems)];
|
|
6009
|
+
return rawItems.length < PAGE_SIZE ? { items, credentials: fresh } : fetchAllPages(path, fresh, responseGroups, items, page + 1);
|
|
4225
6010
|
};
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
6011
|
+
|
|
6012
|
+
// src/catalog.ts
|
|
6013
|
+
var CATALOG_RESPONSE_GROUPS = "product_details,contributors,media,product_attrs,rating,category_ladders,series,product_desc,product_extended_attrs,relationships";
|
|
6014
|
+
var PAGE_SIZE2 = 50;
|
|
6015
|
+
var extractItems2 = (response) => Array.isArray(response.products) ? response.products : Array.isArray(response.items) ? response.items : [];
|
|
6016
|
+
var parseResponse = (response) => extractItems2(response).map((raw) => toAudibleItem(audibleRawItemSchema.parse(raw)));
|
|
6017
|
+
var fetchCatalogPages = async (credentials, categoryId, options, maxPages, accumulated = [], page = 1) => {
|
|
6018
|
+
const { data: response, credentials: fresh } = await audibleFetch("/catalog/products", credentials, {
|
|
6019
|
+
category_id: categoryId,
|
|
6020
|
+
products_sort_by: "Relevance",
|
|
6021
|
+
num_results: String(PAGE_SIZE2),
|
|
6022
|
+
page: String(page),
|
|
6023
|
+
response_groups: CATALOG_RESPONSE_GROUPS,
|
|
6024
|
+
...options.keywords ? { keywords: options.keywords } : {},
|
|
6025
|
+
...options.author ? { author: options.author } : {},
|
|
6026
|
+
...options.narrator ? { narrator: options.narrator } : {}
|
|
6027
|
+
});
|
|
6028
|
+
const rawItems = extractItems2(response);
|
|
6029
|
+
const items = [...accumulated, ...parseResponse(response)];
|
|
6030
|
+
return rawItems.length < PAGE_SIZE2 || page >= maxPages ? { items, credentials: fresh } : fetchCatalogPages(fresh, categoryId, options, maxPages, items, page + 1);
|
|
6031
|
+
};
|
|
6032
|
+
var catalog = async (credentials, options) => {
|
|
6033
|
+
const categoryId = options.category ? resolveGenreId(options.category, credentials.locale) : options.categoryId;
|
|
6034
|
+
if (!categoryId) {
|
|
6035
|
+
throw new Error('Either "category" or "categoryId" must be provided');
|
|
6036
|
+
}
|
|
6037
|
+
const sortBy = options.sortBy ?? "Relevance";
|
|
6038
|
+
const limit = options.limit ?? 50;
|
|
6039
|
+
if (sortBy === "MostVoted") {
|
|
6040
|
+
const MAX_PAGES = 20;
|
|
6041
|
+
const { items: allItems, credentials: fresh2 } = await fetchCatalogPages(credentials, categoryId, options, MAX_PAGES);
|
|
6042
|
+
const sorted = orderBy_default(uniqBy_default(allItems, ({ asin }) => asin), [
|
|
6043
|
+
({ rating }) => rating?.overallDistribution?.numRatings ?? 0,
|
|
6044
|
+
({ rating }) => rating?.overallDistribution?.averageRating ?? 0
|
|
6045
|
+
], ["desc", "desc"]);
|
|
6046
|
+
return {
|
|
6047
|
+
items: limit === "all" ? sorted : sorted.slice(0, limit),
|
|
6048
|
+
credentials: fresh2
|
|
6049
|
+
};
|
|
4241
6050
|
}
|
|
4242
|
-
|
|
6051
|
+
const { data: response, credentials: fresh } = await audibleFetch("/catalog/products", credentials, {
|
|
6052
|
+
category_id: categoryId,
|
|
6053
|
+
products_sort_by: sortBy,
|
|
6054
|
+
num_results: String(limit === "all" ? PAGE_SIZE2 : Math.min(limit, PAGE_SIZE2)),
|
|
6055
|
+
page: "1",
|
|
6056
|
+
response_groups: CATALOG_RESPONSE_GROUPS,
|
|
6057
|
+
...options.keywords ? { keywords: options.keywords } : {},
|
|
6058
|
+
...options.author ? { author: options.author } : {},
|
|
6059
|
+
...options.narrator ? { narrator: options.narrator } : {}
|
|
6060
|
+
});
|
|
6061
|
+
return { items: parseResponse(response), credentials: fresh };
|
|
4243
6062
|
};
|
|
4244
|
-
|
|
4245
|
-
var
|
|
4246
|
-
var
|
|
6063
|
+
// src/library.ts
|
|
6064
|
+
var RESPONSE_GROUPS = "product_details,contributors,media,product_attrs,listening_status,series,rating,category_ladders,product_desc,product_extended_attrs,relationships";
|
|
6065
|
+
var library = async (credentials) => fetchAllPages("/library", credentials, RESPONSE_GROUPS);
|
|
6066
|
+
var wishlist = async (credentials) => fetchAllPages("/wishlist", credentials, RESPONSE_GROUPS);
|
|
6067
|
+
var verify = async (credentials) => {
|
|
4247
6068
|
await audibleFetch("/library", credentials, {
|
|
4248
6069
|
num_results: "1",
|
|
4249
6070
|
page: "1",
|
|
@@ -4251,11 +6072,14 @@ var verifyConnection = async (credentials) => {
|
|
|
4251
6072
|
});
|
|
4252
6073
|
};
|
|
4253
6074
|
export {
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
6075
|
+
wishlist,
|
|
6076
|
+
verify,
|
|
6077
|
+
resolveGenreId,
|
|
6078
|
+
register,
|
|
6079
|
+
refresh,
|
|
6080
|
+
login,
|
|
6081
|
+
library,
|
|
6082
|
+
catalog,
|
|
6083
|
+
GENRE_CATEGORIES,
|
|
4260
6084
|
AUDIBLE_LOCALES
|
|
4261
6085
|
};
|