zmp-sdk 2.19.0-rc.5 → 2.19.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/dist/browser.min.js +339 -537
- package/dist/index.es.js +74 -100
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/apis/index.d.ts +1 -0
- package/dist/types/src/apis/payment.d.ts +0 -9
- package/dist/types/src/services/device.d.ts +8 -0
- package/dist/types/src/services/mock-mp-service.d.ts +3 -2
- package/dist/types/src/services/mock-payment-service.d.ts +0 -1
- package/dist/types/src/services/payment.d.ts +0 -8
- package/dist/types/src/services/window.d.ts +1 -1
- package/dist/types/src/services/zalo-mp-service.d.ts +1 -0
- package/dist/types/src/services/zalo.d.ts +1 -1
- package/dist/types/src/types/callbackData.d.ts +1 -11
- package/dist/types/src/types/enum.d.ts +2 -4
- package/dist/types/src/types/inputData.d.ts +23 -9
- package/dist/types/src/types/interface.d.ts +3 -3
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
* @param {*} value The value to check.
|
|
61
61
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
62
62
|
*/
|
|
63
|
-
function isPrototype
|
|
63
|
+
function isPrototype(value) {
|
|
64
64
|
var Ctor = value && value.constructor,
|
|
65
65
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$9;
|
|
66
66
|
|
|
67
67
|
return value === proto;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
var _isPrototype = isPrototype
|
|
70
|
+
var _isPrototype = isPrototype;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
@@ -77,24 +77,18 @@
|
|
|
77
77
|
* @param {Function} transform The argument transform.
|
|
78
78
|
* @returns {Function} Returns the new function.
|
|
79
79
|
*/
|
|
80
|
-
function overArg
|
|
80
|
+
function overArg(func, transform) {
|
|
81
81
|
return function(arg) {
|
|
82
82
|
return func(transform(arg));
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
var _overArg = overArg
|
|
87
|
-
|
|
88
|
-
var overArg = _overArg;
|
|
86
|
+
var _overArg = overArg;
|
|
89
87
|
|
|
90
88
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
91
|
-
var nativeKeys
|
|
92
|
-
|
|
93
|
-
var _nativeKeys = nativeKeys$1;
|
|
94
|
-
|
|
95
|
-
var isPrototype = _isPrototype;
|
|
89
|
+
var nativeKeys = _overArg(Object.keys, Object);
|
|
96
90
|
|
|
97
|
-
var
|
|
91
|
+
var _nativeKeys = nativeKeys;
|
|
98
92
|
|
|
99
93
|
/** Used for built-in method references. */
|
|
100
94
|
var objectProto$8 = Object.prototype;
|
|
@@ -109,9 +103,9 @@
|
|
|
109
103
|
* @param {Object} object The object to query.
|
|
110
104
|
* @returns {Array} Returns the array of property names.
|
|
111
105
|
*/
|
|
112
|
-
function baseKeys
|
|
113
|
-
if (!
|
|
114
|
-
return
|
|
106
|
+
function baseKeys(object) {
|
|
107
|
+
if (!_isPrototype(object)) {
|
|
108
|
+
return _nativeKeys(object);
|
|
115
109
|
}
|
|
116
110
|
var result = [];
|
|
117
111
|
for (var key in Object(object)) {
|
|
@@ -122,7 +116,7 @@
|
|
|
122
116
|
return result;
|
|
123
117
|
}
|
|
124
118
|
|
|
125
|
-
var _baseKeys = baseKeys
|
|
119
|
+
var _baseKeys = baseKeys;
|
|
126
120
|
|
|
127
121
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
128
122
|
|
|
@@ -131,28 +125,22 @@
|
|
|
131
125
|
}
|
|
132
126
|
|
|
133
127
|
/** Detect free variable `global` from Node.js. */
|
|
134
|
-
var freeGlobal
|
|
128
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
135
129
|
|
|
136
|
-
var _freeGlobal = freeGlobal
|
|
137
|
-
|
|
138
|
-
var freeGlobal = _freeGlobal;
|
|
130
|
+
var _freeGlobal = freeGlobal;
|
|
139
131
|
|
|
140
132
|
/** Detect free variable `self`. */
|
|
141
133
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
142
134
|
|
|
143
135
|
/** Used as a reference to the global object. */
|
|
144
|
-
var root
|
|
145
|
-
|
|
146
|
-
var _root = root$1;
|
|
136
|
+
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
147
137
|
|
|
148
|
-
var
|
|
138
|
+
var _root = root;
|
|
149
139
|
|
|
150
140
|
/** Built-in value references. */
|
|
151
|
-
var Symbol$
|
|
141
|
+
var Symbol$1 = _root.Symbol;
|
|
152
142
|
|
|
153
|
-
var _Symbol = Symbol$
|
|
154
|
-
|
|
155
|
-
var Symbol$1 = _Symbol;
|
|
143
|
+
var _Symbol = Symbol$1;
|
|
156
144
|
|
|
157
145
|
/** Used for built-in method references. */
|
|
158
146
|
var objectProto$7 = Object.prototype;
|
|
@@ -168,7 +156,7 @@
|
|
|
168
156
|
var nativeObjectToString$1 = objectProto$7.toString;
|
|
169
157
|
|
|
170
158
|
/** Built-in value references. */
|
|
171
|
-
var symToStringTag$1 =
|
|
159
|
+
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
172
160
|
|
|
173
161
|
/**
|
|
174
162
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -177,7 +165,7 @@
|
|
|
177
165
|
* @param {*} value The value to query.
|
|
178
166
|
* @returns {string} Returns the raw `toStringTag`.
|
|
179
167
|
*/
|
|
180
|
-
function getRawTag
|
|
168
|
+
function getRawTag(value) {
|
|
181
169
|
var isOwn = hasOwnProperty$6.call(value, symToStringTag$1),
|
|
182
170
|
tag = value[symToStringTag$1];
|
|
183
171
|
|
|
@@ -197,7 +185,7 @@
|
|
|
197
185
|
return result;
|
|
198
186
|
}
|
|
199
187
|
|
|
200
|
-
var _getRawTag = getRawTag
|
|
188
|
+
var _getRawTag = getRawTag;
|
|
201
189
|
|
|
202
190
|
/** Used for built-in method references. */
|
|
203
191
|
var objectProto$6 = Object.prototype;
|
|
@@ -216,22 +204,18 @@
|
|
|
216
204
|
* @param {*} value The value to convert.
|
|
217
205
|
* @returns {string} Returns the converted string.
|
|
218
206
|
*/
|
|
219
|
-
function objectToString
|
|
207
|
+
function objectToString(value) {
|
|
220
208
|
return nativeObjectToString.call(value);
|
|
221
209
|
}
|
|
222
210
|
|
|
223
|
-
var _objectToString = objectToString
|
|
224
|
-
|
|
225
|
-
var getRawTag = _getRawTag;
|
|
226
|
-
|
|
227
|
-
var objectToString = _objectToString;
|
|
211
|
+
var _objectToString = objectToString;
|
|
228
212
|
|
|
229
213
|
/** `Object#toString` result references. */
|
|
230
214
|
var nullTag = '[object Null]',
|
|
231
215
|
undefinedTag = '[object Undefined]';
|
|
232
216
|
|
|
233
217
|
/** Built-in value references. */
|
|
234
|
-
var symToStringTag =
|
|
218
|
+
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
235
219
|
|
|
236
220
|
/**
|
|
237
221
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
@@ -240,16 +224,16 @@
|
|
|
240
224
|
* @param {*} value The value to query.
|
|
241
225
|
* @returns {string} Returns the `toStringTag`.
|
|
242
226
|
*/
|
|
243
|
-
function baseGetTag
|
|
227
|
+
function baseGetTag(value) {
|
|
244
228
|
if (value == null) {
|
|
245
229
|
return value === undefined ? undefinedTag : nullTag;
|
|
246
230
|
}
|
|
247
231
|
return (symToStringTag && symToStringTag in Object(value))
|
|
248
|
-
?
|
|
249
|
-
:
|
|
232
|
+
? _getRawTag(value)
|
|
233
|
+
: _objectToString(value);
|
|
250
234
|
}
|
|
251
235
|
|
|
252
|
-
var _baseGetTag = baseGetTag
|
|
236
|
+
var _baseGetTag = baseGetTag;
|
|
253
237
|
|
|
254
238
|
/**
|
|
255
239
|
* Checks if `value` is the
|
|
@@ -283,10 +267,6 @@
|
|
|
283
267
|
|
|
284
268
|
var isObject_1 = isObject;
|
|
285
269
|
|
|
286
|
-
var isObject$1 = isObject_1;
|
|
287
|
-
|
|
288
|
-
var baseGetTag = _baseGetTag;
|
|
289
|
-
|
|
290
270
|
/** `Object#toString` result references. */
|
|
291
271
|
var asyncTag = '[object AsyncFunction]',
|
|
292
272
|
funcTag$1 = '[object Function]',
|
|
@@ -316,24 +296,20 @@
|
|
|
316
296
|
}
|
|
317
297
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
318
298
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
319
|
-
var tag =
|
|
299
|
+
var tag = _baseGetTag(value);
|
|
320
300
|
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
321
301
|
}
|
|
322
302
|
|
|
323
303
|
var isFunction_1 = isFunction;
|
|
324
304
|
|
|
325
|
-
var isFunction$1 = isFunction_1;
|
|
326
|
-
|
|
327
305
|
/** Used to detect overreaching core-js shims. */
|
|
328
|
-
var coreJsData
|
|
329
|
-
|
|
330
|
-
var _coreJsData = coreJsData$1;
|
|
306
|
+
var coreJsData = _root['__core-js_shared__'];
|
|
331
307
|
|
|
332
|
-
var
|
|
308
|
+
var _coreJsData = coreJsData;
|
|
333
309
|
|
|
334
310
|
/** Used to detect methods masquerading as native. */
|
|
335
311
|
var maskSrcKey = (function() {
|
|
336
|
-
var uid = /[^.]+$/.exec(
|
|
312
|
+
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
337
313
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
338
314
|
}());
|
|
339
315
|
|
|
@@ -344,11 +320,11 @@
|
|
|
344
320
|
* @param {Function} func The function to check.
|
|
345
321
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
346
322
|
*/
|
|
347
|
-
function isMasked
|
|
323
|
+
function isMasked(func) {
|
|
348
324
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
349
325
|
}
|
|
350
326
|
|
|
351
|
-
var _isMasked = isMasked
|
|
327
|
+
var _isMasked = isMasked;
|
|
352
328
|
|
|
353
329
|
/** Used for built-in method references. */
|
|
354
330
|
var funcProto$1 = Function.prototype;
|
|
@@ -363,7 +339,7 @@
|
|
|
363
339
|
* @param {Function} func The function to convert.
|
|
364
340
|
* @returns {string} Returns the source code.
|
|
365
341
|
*/
|
|
366
|
-
function toSource
|
|
342
|
+
function toSource(func) {
|
|
367
343
|
if (func != null) {
|
|
368
344
|
try {
|
|
369
345
|
return funcToString$1.call(func);
|
|
@@ -375,11 +351,7 @@
|
|
|
375
351
|
return '';
|
|
376
352
|
}
|
|
377
353
|
|
|
378
|
-
var _toSource = toSource
|
|
379
|
-
|
|
380
|
-
var isMasked = _isMasked;
|
|
381
|
-
|
|
382
|
-
var toSource = _toSource;
|
|
354
|
+
var _toSource = toSource;
|
|
383
355
|
|
|
384
356
|
/**
|
|
385
357
|
* Used to match `RegExp`
|
|
@@ -414,15 +386,15 @@
|
|
|
414
386
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
415
387
|
* else `false`.
|
|
416
388
|
*/
|
|
417
|
-
function baseIsNative
|
|
418
|
-
if (!isObject_1(value) ||
|
|
389
|
+
function baseIsNative(value) {
|
|
390
|
+
if (!isObject_1(value) || _isMasked(value)) {
|
|
419
391
|
return false;
|
|
420
392
|
}
|
|
421
393
|
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
422
|
-
return pattern.test(
|
|
394
|
+
return pattern.test(_toSource(value));
|
|
423
395
|
}
|
|
424
396
|
|
|
425
|
-
var _baseIsNative = baseIsNative
|
|
397
|
+
var _baseIsNative = baseIsNative;
|
|
426
398
|
|
|
427
399
|
/**
|
|
428
400
|
* Gets the value at `key` of `object`.
|
|
@@ -432,15 +404,11 @@
|
|
|
432
404
|
* @param {string} key The key of the property to get.
|
|
433
405
|
* @returns {*} Returns the property value.
|
|
434
406
|
*/
|
|
435
|
-
function getValue
|
|
407
|
+
function getValue(object, key) {
|
|
436
408
|
return object == null ? undefined : object[key];
|
|
437
409
|
}
|
|
438
410
|
|
|
439
|
-
var _getValue = getValue
|
|
440
|
-
|
|
441
|
-
var baseIsNative = _baseIsNative;
|
|
442
|
-
|
|
443
|
-
var getValue = _getValue;
|
|
411
|
+
var _getValue = getValue;
|
|
444
412
|
|
|
445
413
|
/**
|
|
446
414
|
* Gets the native function at `key` of `object`.
|
|
@@ -450,49 +418,37 @@
|
|
|
450
418
|
* @param {string} key The key of the method to get.
|
|
451
419
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
452
420
|
*/
|
|
453
|
-
function getNative
|
|
454
|
-
var value =
|
|
455
|
-
return
|
|
421
|
+
function getNative(object, key) {
|
|
422
|
+
var value = _getValue(object, key);
|
|
423
|
+
return _baseIsNative(value) ? value : undefined;
|
|
456
424
|
}
|
|
457
425
|
|
|
458
|
-
var _getNative = getNative
|
|
459
|
-
|
|
460
|
-
var getNative = _getNative;
|
|
426
|
+
var _getNative = getNative;
|
|
461
427
|
|
|
462
428
|
/* Built-in method references that are verified to be native. */
|
|
463
|
-
var DataView
|
|
429
|
+
var DataView = _getNative(_root, 'DataView');
|
|
464
430
|
|
|
465
|
-
var _DataView = DataView
|
|
431
|
+
var _DataView = DataView;
|
|
466
432
|
|
|
467
433
|
/* Built-in method references that are verified to be native. */
|
|
468
|
-
var Map$
|
|
434
|
+
var Map$1 = _getNative(_root, 'Map');
|
|
469
435
|
|
|
470
|
-
var _Map = Map$
|
|
436
|
+
var _Map = Map$1;
|
|
471
437
|
|
|
472
438
|
/* Built-in method references that are verified to be native. */
|
|
473
|
-
var Promise$
|
|
439
|
+
var Promise$1 = _getNative(_root, 'Promise');
|
|
474
440
|
|
|
475
|
-
var _Promise = Promise$
|
|
441
|
+
var _Promise = Promise$1;
|
|
476
442
|
|
|
477
443
|
/* Built-in method references that are verified to be native. */
|
|
478
|
-
var Set$
|
|
444
|
+
var Set$1 = _getNative(_root, 'Set');
|
|
479
445
|
|
|
480
|
-
var _Set = Set$
|
|
446
|
+
var _Set = Set$1;
|
|
481
447
|
|
|
482
448
|
/* Built-in method references that are verified to be native. */
|
|
483
|
-
var WeakMap$
|
|
484
|
-
|
|
485
|
-
var _WeakMap = WeakMap$2;
|
|
486
|
-
|
|
487
|
-
var DataView = _DataView;
|
|
488
|
-
|
|
489
|
-
var Map$1 = _Map;
|
|
449
|
+
var WeakMap$1 = _getNative(_root, 'WeakMap');
|
|
490
450
|
|
|
491
|
-
var
|
|
492
|
-
|
|
493
|
-
var Set$1 = _Set;
|
|
494
|
-
|
|
495
|
-
var WeakMap$1 = _WeakMap;
|
|
451
|
+
var _WeakMap = WeakMap$1;
|
|
496
452
|
|
|
497
453
|
/** `Object#toString` result references. */
|
|
498
454
|
var mapTag$2 = '[object Map]',
|
|
@@ -504,11 +460,11 @@
|
|
|
504
460
|
var dataViewTag$1 = '[object DataView]';
|
|
505
461
|
|
|
506
462
|
/** Used to detect maps, sets, and weakmaps. */
|
|
507
|
-
var dataViewCtorString =
|
|
508
|
-
mapCtorString =
|
|
509
|
-
promiseCtorString =
|
|
510
|
-
setCtorString =
|
|
511
|
-
weakMapCtorString =
|
|
463
|
+
var dataViewCtorString = _toSource(_DataView),
|
|
464
|
+
mapCtorString = _toSource(_Map),
|
|
465
|
+
promiseCtorString = _toSource(_Promise),
|
|
466
|
+
setCtorString = _toSource(_Set),
|
|
467
|
+
weakMapCtorString = _toSource(_WeakMap);
|
|
512
468
|
|
|
513
469
|
/**
|
|
514
470
|
* Gets the `toStringTag` of `value`.
|
|
@@ -517,18 +473,18 @@
|
|
|
517
473
|
* @param {*} value The value to query.
|
|
518
474
|
* @returns {string} Returns the `toStringTag`.
|
|
519
475
|
*/
|
|
520
|
-
var getTag
|
|
476
|
+
var getTag = _baseGetTag;
|
|
521
477
|
|
|
522
478
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
523
|
-
if ((
|
|
524
|
-
(
|
|
525
|
-
(
|
|
526
|
-
(
|
|
527
|
-
(
|
|
528
|
-
getTag
|
|
529
|
-
var result =
|
|
479
|
+
if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
|
|
480
|
+
(_Map && getTag(new _Map) != mapTag$2) ||
|
|
481
|
+
(_Promise && getTag(_Promise.resolve()) != promiseTag) ||
|
|
482
|
+
(_Set && getTag(new _Set) != setTag$2) ||
|
|
483
|
+
(_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
|
|
484
|
+
getTag = function(value) {
|
|
485
|
+
var result = _baseGetTag(value),
|
|
530
486
|
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
531
|
-
ctorString = Ctor ?
|
|
487
|
+
ctorString = Ctor ? _toSource(Ctor) : '';
|
|
532
488
|
|
|
533
489
|
if (ctorString) {
|
|
534
490
|
switch (ctorString) {
|
|
@@ -543,7 +499,7 @@
|
|
|
543
499
|
};
|
|
544
500
|
}
|
|
545
501
|
|
|
546
|
-
var _getTag = getTag
|
|
502
|
+
var _getTag = getTag;
|
|
547
503
|
|
|
548
504
|
/**
|
|
549
505
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
@@ -569,13 +525,11 @@
|
|
|
569
525
|
* _.isObjectLike(null);
|
|
570
526
|
* // => false
|
|
571
527
|
*/
|
|
572
|
-
function isObjectLike
|
|
528
|
+
function isObjectLike(value) {
|
|
573
529
|
return value != null && typeof value == 'object';
|
|
574
530
|
}
|
|
575
531
|
|
|
576
|
-
var isObjectLike_1 = isObjectLike
|
|
577
|
-
|
|
578
|
-
var isObjectLike = isObjectLike_1;
|
|
532
|
+
var isObjectLike_1 = isObjectLike;
|
|
579
533
|
|
|
580
534
|
/** `Object#toString` result references. */
|
|
581
535
|
var argsTag$1 = '[object Arguments]';
|
|
@@ -587,13 +541,11 @@
|
|
|
587
541
|
* @param {*} value The value to check.
|
|
588
542
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
589
543
|
*/
|
|
590
|
-
function baseIsArguments
|
|
591
|
-
return
|
|
544
|
+
function baseIsArguments(value) {
|
|
545
|
+
return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
|
|
592
546
|
}
|
|
593
547
|
|
|
594
|
-
var _baseIsArguments = baseIsArguments
|
|
595
|
-
|
|
596
|
-
var baseIsArguments = _baseIsArguments;
|
|
548
|
+
var _baseIsArguments = baseIsArguments;
|
|
597
549
|
|
|
598
550
|
/** Used for built-in method references. */
|
|
599
551
|
var objectProto$4 = Object.prototype;
|
|
@@ -622,12 +574,12 @@
|
|
|
622
574
|
* _.isArguments([1, 2, 3]);
|
|
623
575
|
* // => false
|
|
624
576
|
*/
|
|
625
|
-
var isArguments
|
|
626
|
-
return
|
|
577
|
+
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
578
|
+
return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
|
|
627
579
|
!propertyIsEnumerable.call(value, 'callee');
|
|
628
580
|
};
|
|
629
581
|
|
|
630
|
-
var isArguments_1 = isArguments
|
|
582
|
+
var isArguments_1 = isArguments;
|
|
631
583
|
|
|
632
584
|
/**
|
|
633
585
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -656,8 +608,6 @@
|
|
|
656
608
|
|
|
657
609
|
var isArray_1 = isArray$1;
|
|
658
610
|
|
|
659
|
-
var isArray$2 = isArray_1;
|
|
660
|
-
|
|
661
611
|
/** Used as references for various `Number` constants. */
|
|
662
612
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
663
613
|
|
|
@@ -687,14 +637,12 @@
|
|
|
687
637
|
* _.isLength('3');
|
|
688
638
|
* // => false
|
|
689
639
|
*/
|
|
690
|
-
function isLength
|
|
640
|
+
function isLength(value) {
|
|
691
641
|
return typeof value == 'number' &&
|
|
692
642
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
|
|
693
643
|
}
|
|
694
644
|
|
|
695
|
-
var isLength_1 = isLength
|
|
696
|
-
|
|
697
|
-
var isLength = isLength_1;
|
|
645
|
+
var isLength_1 = isLength;
|
|
698
646
|
|
|
699
647
|
/**
|
|
700
648
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
@@ -721,11 +669,11 @@
|
|
|
721
669
|
* _.isArrayLike(_.noop);
|
|
722
670
|
* // => false
|
|
723
671
|
*/
|
|
724
|
-
function isArrayLike
|
|
725
|
-
return value != null &&
|
|
672
|
+
function isArrayLike(value) {
|
|
673
|
+
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
726
674
|
}
|
|
727
675
|
|
|
728
|
-
var isArrayLike_1 = isArrayLike
|
|
676
|
+
var isArrayLike_1 = isArrayLike;
|
|
729
677
|
|
|
730
678
|
/**
|
|
731
679
|
* This method returns `false`.
|
|
@@ -740,13 +688,11 @@
|
|
|
740
688
|
* _.times(2, _.stubFalse);
|
|
741
689
|
* // => [false, false]
|
|
742
690
|
*/
|
|
743
|
-
function stubFalse
|
|
691
|
+
function stubFalse() {
|
|
744
692
|
return false;
|
|
745
693
|
}
|
|
746
694
|
|
|
747
|
-
var stubFalse_1 = stubFalse
|
|
748
|
-
|
|
749
|
-
var stubFalse = stubFalse_1;
|
|
695
|
+
var stubFalse_1 = stubFalse;
|
|
750
696
|
|
|
751
697
|
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
752
698
|
/** Detect free variable `exports`. */
|
|
@@ -759,7 +705,7 @@
|
|
|
759
705
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
760
706
|
|
|
761
707
|
/** Built-in value references. */
|
|
762
|
-
var Buffer = moduleExports ?
|
|
708
|
+
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
763
709
|
|
|
764
710
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
765
711
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
@@ -781,7 +727,7 @@
|
|
|
781
727
|
* _.isBuffer(new Uint8Array(2));
|
|
782
728
|
* // => false
|
|
783
729
|
*/
|
|
784
|
-
var isBuffer = nativeIsBuffer ||
|
|
730
|
+
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
785
731
|
|
|
786
732
|
module.exports = isBuffer;
|
|
787
733
|
});
|
|
@@ -836,12 +782,12 @@
|
|
|
836
782
|
* @param {*} value The value to check.
|
|
837
783
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
838
784
|
*/
|
|
839
|
-
function baseIsTypedArray
|
|
840
|
-
return
|
|
841
|
-
|
|
785
|
+
function baseIsTypedArray(value) {
|
|
786
|
+
return isObjectLike_1(value) &&
|
|
787
|
+
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
842
788
|
}
|
|
843
789
|
|
|
844
|
-
var _baseIsTypedArray = baseIsTypedArray
|
|
790
|
+
var _baseIsTypedArray = baseIsTypedArray;
|
|
845
791
|
|
|
846
792
|
/**
|
|
847
793
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
@@ -850,13 +796,13 @@
|
|
|
850
796
|
* @param {Function} func The function to cap arguments for.
|
|
851
797
|
* @returns {Function} Returns the new capped function.
|
|
852
798
|
*/
|
|
853
|
-
function baseUnary
|
|
799
|
+
function baseUnary(func) {
|
|
854
800
|
return function(value) {
|
|
855
801
|
return func(value);
|
|
856
802
|
};
|
|
857
803
|
}
|
|
858
804
|
|
|
859
|
-
var _baseUnary = baseUnary
|
|
805
|
+
var _baseUnary = baseUnary;
|
|
860
806
|
|
|
861
807
|
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
862
808
|
/** Detect free variable `exports`. */
|
|
@@ -869,7 +815,7 @@
|
|
|
869
815
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
870
816
|
|
|
871
817
|
/** Detect free variable `process` from Node.js. */
|
|
872
|
-
var freeProcess = moduleExports &&
|
|
818
|
+
var freeProcess = moduleExports && _freeGlobal.process;
|
|
873
819
|
|
|
874
820
|
/** Used to access faster Node.js helpers. */
|
|
875
821
|
var nodeUtil = (function() {
|
|
@@ -889,14 +835,8 @@
|
|
|
889
835
|
module.exports = nodeUtil;
|
|
890
836
|
});
|
|
891
837
|
|
|
892
|
-
var baseIsTypedArray = _baseIsTypedArray;
|
|
893
|
-
|
|
894
|
-
var baseUnary = _baseUnary;
|
|
895
|
-
|
|
896
|
-
var nodeUtil = _nodeUtil;
|
|
897
|
-
|
|
898
838
|
/* Node.js helper references. */
|
|
899
|
-
var nodeIsTypedArray =
|
|
839
|
+
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
900
840
|
|
|
901
841
|
/**
|
|
902
842
|
* Checks if `value` is classified as a typed array.
|
|
@@ -915,21 +855,9 @@
|
|
|
915
855
|
* _.isTypedArray([]);
|
|
916
856
|
* // => false
|
|
917
857
|
*/
|
|
918
|
-
var isTypedArray
|
|
858
|
+
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
919
859
|
|
|
920
|
-
var isTypedArray_1 = isTypedArray
|
|
921
|
-
|
|
922
|
-
var baseKeys = _baseKeys;
|
|
923
|
-
|
|
924
|
-
var getTag = _getTag;
|
|
925
|
-
|
|
926
|
-
var isArguments = isArguments_1;
|
|
927
|
-
|
|
928
|
-
var isArrayLike = isArrayLike_1;
|
|
929
|
-
|
|
930
|
-
var isBuffer = isBuffer_1;
|
|
931
|
-
|
|
932
|
-
var isTypedArray = isTypedArray_1;
|
|
860
|
+
var isTypedArray_1 = isTypedArray;
|
|
933
861
|
|
|
934
862
|
/** `Object#toString` result references. */
|
|
935
863
|
var mapTag = '[object Map]',
|
|
@@ -978,17 +906,17 @@
|
|
|
978
906
|
if (value == null) {
|
|
979
907
|
return true;
|
|
980
908
|
}
|
|
981
|
-
if (
|
|
909
|
+
if (isArrayLike_1(value) &&
|
|
982
910
|
(isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
983
|
-
|
|
911
|
+
isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
|
|
984
912
|
return !value.length;
|
|
985
913
|
}
|
|
986
|
-
var tag =
|
|
914
|
+
var tag = _getTag(value);
|
|
987
915
|
if (tag == mapTag || tag == setTag) {
|
|
988
916
|
return !value.size;
|
|
989
917
|
}
|
|
990
|
-
if (
|
|
991
|
-
return !
|
|
918
|
+
if (_isPrototype(value)) {
|
|
919
|
+
return !_baseKeys(value).length;
|
|
992
920
|
}
|
|
993
921
|
for (var key in value) {
|
|
994
922
|
if (hasOwnProperty$3.call(value, key)) {
|
|
@@ -1000,8 +928,6 @@
|
|
|
1000
928
|
|
|
1001
929
|
var isEmpty_1 = isEmpty;
|
|
1002
930
|
|
|
1003
|
-
var isEmpty$1 = isEmpty_1;
|
|
1004
|
-
|
|
1005
931
|
/**
|
|
1006
932
|
* Checks if `value` is `undefined`.
|
|
1007
933
|
*
|
|
@@ -1025,8 +951,6 @@
|
|
|
1025
951
|
|
|
1026
952
|
var isUndefined_1 = isUndefined;
|
|
1027
953
|
|
|
1028
|
-
var isUndefined$1 = isUndefined_1;
|
|
1029
|
-
|
|
1030
954
|
/**
|
|
1031
955
|
* Checks if `value` is `null`.
|
|
1032
956
|
*
|
|
@@ -1050,8 +974,6 @@
|
|
|
1050
974
|
|
|
1051
975
|
var isNull_1 = isNull;
|
|
1052
976
|
|
|
1053
|
-
var isNull$1 = isNull_1;
|
|
1054
|
-
|
|
1055
977
|
/** `Object#toString` result references. */
|
|
1056
978
|
var stringTag = '[object String]';
|
|
1057
979
|
|
|
@@ -1074,13 +996,11 @@
|
|
|
1074
996
|
*/
|
|
1075
997
|
function isString(value) {
|
|
1076
998
|
return typeof value == 'string' ||
|
|
1077
|
-
(!isArray_1(value) &&
|
|
999
|
+
(!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
|
|
1078
1000
|
}
|
|
1079
1001
|
|
|
1080
1002
|
var isString_1 = isString;
|
|
1081
1003
|
|
|
1082
|
-
var isString$1 = isString_1;
|
|
1083
|
-
|
|
1084
1004
|
/** `Object#toString` result references. */
|
|
1085
1005
|
var numberTag = '[object Number]';
|
|
1086
1006
|
|
|
@@ -1112,13 +1032,11 @@
|
|
|
1112
1032
|
*/
|
|
1113
1033
|
function isNumber(value) {
|
|
1114
1034
|
return typeof value == 'number' ||
|
|
1115
|
-
(
|
|
1035
|
+
(isObjectLike_1(value) && _baseGetTag(value) == numberTag);
|
|
1116
1036
|
}
|
|
1117
1037
|
|
|
1118
1038
|
var isNumber_1 = isNumber;
|
|
1119
1039
|
|
|
1120
|
-
var isNumber$1 = isNumber_1;
|
|
1121
|
-
|
|
1122
1040
|
/** `Object#toString` result references. */
|
|
1123
1041
|
var regexpTag = '[object RegExp]';
|
|
1124
1042
|
|
|
@@ -1129,16 +1047,14 @@
|
|
|
1129
1047
|
* @param {*} value The value to check.
|
|
1130
1048
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
1131
1049
|
*/
|
|
1132
|
-
function baseIsRegExp
|
|
1133
|
-
return
|
|
1050
|
+
function baseIsRegExp(value) {
|
|
1051
|
+
return isObjectLike_1(value) && _baseGetTag(value) == regexpTag;
|
|
1134
1052
|
}
|
|
1135
1053
|
|
|
1136
|
-
var _baseIsRegExp = baseIsRegExp
|
|
1137
|
-
|
|
1138
|
-
var baseIsRegExp = _baseIsRegExp;
|
|
1054
|
+
var _baseIsRegExp = baseIsRegExp;
|
|
1139
1055
|
|
|
1140
1056
|
/* Node.js helper references. */
|
|
1141
|
-
var nodeIsRegExp =
|
|
1057
|
+
var nodeIsRegExp = _nodeUtil && _nodeUtil.isRegExp;
|
|
1142
1058
|
|
|
1143
1059
|
/**
|
|
1144
1060
|
* Checks if `value` is classified as a `RegExp` object.
|
|
@@ -1157,12 +1073,10 @@
|
|
|
1157
1073
|
* _.isRegExp('/abc/');
|
|
1158
1074
|
* // => false
|
|
1159
1075
|
*/
|
|
1160
|
-
var isRegExp = nodeIsRegExp ?
|
|
1076
|
+
var isRegExp = nodeIsRegExp ? _baseUnary(nodeIsRegExp) : _baseIsRegExp;
|
|
1161
1077
|
|
|
1162
1078
|
var isRegExp_1 = isRegExp;
|
|
1163
1079
|
|
|
1164
|
-
var isRegExp$1 = isRegExp_1;
|
|
1165
|
-
|
|
1166
1080
|
/** `Object#toString` result references. */
|
|
1167
1081
|
var symbolTag = '[object Symbol]';
|
|
1168
1082
|
|
|
@@ -1183,14 +1097,12 @@
|
|
|
1183
1097
|
* _.isSymbol('abc');
|
|
1184
1098
|
* // => false
|
|
1185
1099
|
*/
|
|
1186
|
-
function isSymbol
|
|
1100
|
+
function isSymbol(value) {
|
|
1187
1101
|
return typeof value == 'symbol' ||
|
|
1188
|
-
(
|
|
1102
|
+
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1189
1103
|
}
|
|
1190
1104
|
|
|
1191
|
-
var isSymbol_1 = isSymbol
|
|
1192
|
-
|
|
1193
|
-
var isSymbol = isSymbol_1;
|
|
1105
|
+
var isSymbol_1 = isSymbol;
|
|
1194
1106
|
|
|
1195
1107
|
/** Used to match property names within property paths. */
|
|
1196
1108
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
@@ -1204,27 +1116,25 @@
|
|
|
1204
1116
|
* @param {Object} [object] The object to query keys on.
|
|
1205
1117
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1206
1118
|
*/
|
|
1207
|
-
function isKey
|
|
1119
|
+
function isKey(value, object) {
|
|
1208
1120
|
if (isArray_1(value)) {
|
|
1209
1121
|
return false;
|
|
1210
1122
|
}
|
|
1211
1123
|
var type = typeof value;
|
|
1212
1124
|
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1213
|
-
value == null ||
|
|
1125
|
+
value == null || isSymbol_1(value)) {
|
|
1214
1126
|
return true;
|
|
1215
1127
|
}
|
|
1216
1128
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1217
1129
|
(object != null && value in Object(object));
|
|
1218
1130
|
}
|
|
1219
1131
|
|
|
1220
|
-
var _isKey = isKey
|
|
1132
|
+
var _isKey = isKey;
|
|
1221
1133
|
|
|
1222
1134
|
/* Built-in method references that are verified to be native. */
|
|
1223
|
-
var nativeCreate
|
|
1135
|
+
var nativeCreate = _getNative(Object, 'create');
|
|
1224
1136
|
|
|
1225
|
-
var _nativeCreate = nativeCreate
|
|
1226
|
-
|
|
1227
|
-
var nativeCreate = _nativeCreate;
|
|
1137
|
+
var _nativeCreate = nativeCreate;
|
|
1228
1138
|
|
|
1229
1139
|
/**
|
|
1230
1140
|
* Removes all key-value entries from the hash.
|
|
@@ -1233,12 +1143,12 @@
|
|
|
1233
1143
|
* @name clear
|
|
1234
1144
|
* @memberOf Hash
|
|
1235
1145
|
*/
|
|
1236
|
-
function hashClear
|
|
1237
|
-
this.__data__ =
|
|
1146
|
+
function hashClear() {
|
|
1147
|
+
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1238
1148
|
this.size = 0;
|
|
1239
1149
|
}
|
|
1240
1150
|
|
|
1241
|
-
var _hashClear = hashClear
|
|
1151
|
+
var _hashClear = hashClear;
|
|
1242
1152
|
|
|
1243
1153
|
/**
|
|
1244
1154
|
* Removes `key` and its value from the hash.
|
|
@@ -1250,13 +1160,13 @@
|
|
|
1250
1160
|
* @param {string} key The key of the value to remove.
|
|
1251
1161
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1252
1162
|
*/
|
|
1253
|
-
function hashDelete
|
|
1163
|
+
function hashDelete(key) {
|
|
1254
1164
|
var result = this.has(key) && delete this.__data__[key];
|
|
1255
1165
|
this.size -= result ? 1 : 0;
|
|
1256
1166
|
return result;
|
|
1257
1167
|
}
|
|
1258
1168
|
|
|
1259
|
-
var _hashDelete = hashDelete
|
|
1169
|
+
var _hashDelete = hashDelete;
|
|
1260
1170
|
|
|
1261
1171
|
/** Used to stand-in for `undefined` hash values. */
|
|
1262
1172
|
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
@@ -1276,16 +1186,16 @@
|
|
|
1276
1186
|
* @param {string} key The key of the value to get.
|
|
1277
1187
|
* @returns {*} Returns the entry value.
|
|
1278
1188
|
*/
|
|
1279
|
-
function hashGet
|
|
1189
|
+
function hashGet(key) {
|
|
1280
1190
|
var data = this.__data__;
|
|
1281
|
-
if (
|
|
1191
|
+
if (_nativeCreate) {
|
|
1282
1192
|
var result = data[key];
|
|
1283
1193
|
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1284
1194
|
}
|
|
1285
1195
|
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
1286
1196
|
}
|
|
1287
1197
|
|
|
1288
|
-
var _hashGet = hashGet
|
|
1198
|
+
var _hashGet = hashGet;
|
|
1289
1199
|
|
|
1290
1200
|
/** Used for built-in method references. */
|
|
1291
1201
|
var objectProto$1 = Object.prototype;
|
|
@@ -1302,12 +1212,12 @@
|
|
|
1302
1212
|
* @param {string} key The key of the entry to check.
|
|
1303
1213
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1304
1214
|
*/
|
|
1305
|
-
function hashHas
|
|
1215
|
+
function hashHas(key) {
|
|
1306
1216
|
var data = this.__data__;
|
|
1307
|
-
return
|
|
1217
|
+
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
|
|
1308
1218
|
}
|
|
1309
1219
|
|
|
1310
|
-
var _hashHas = hashHas
|
|
1220
|
+
var _hashHas = hashHas;
|
|
1311
1221
|
|
|
1312
1222
|
/** Used to stand-in for `undefined` hash values. */
|
|
1313
1223
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
@@ -1322,24 +1232,14 @@
|
|
|
1322
1232
|
* @param {*} value The value to set.
|
|
1323
1233
|
* @returns {Object} Returns the hash instance.
|
|
1324
1234
|
*/
|
|
1325
|
-
function hashSet
|
|
1235
|
+
function hashSet(key, value) {
|
|
1326
1236
|
var data = this.__data__;
|
|
1327
1237
|
this.size += this.has(key) ? 0 : 1;
|
|
1328
|
-
data[key] = (
|
|
1238
|
+
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1329
1239
|
return this;
|
|
1330
1240
|
}
|
|
1331
1241
|
|
|
1332
|
-
var _hashSet = hashSet
|
|
1333
|
-
|
|
1334
|
-
var hashClear = _hashClear;
|
|
1335
|
-
|
|
1336
|
-
var hashDelete = _hashDelete;
|
|
1337
|
-
|
|
1338
|
-
var hashGet = _hashGet;
|
|
1339
|
-
|
|
1340
|
-
var hashHas = _hashHas;
|
|
1341
|
-
|
|
1342
|
-
var hashSet = _hashSet;
|
|
1242
|
+
var _hashSet = hashSet;
|
|
1343
1243
|
|
|
1344
1244
|
/**
|
|
1345
1245
|
* Creates a hash object.
|
|
@@ -1348,7 +1248,7 @@
|
|
|
1348
1248
|
* @constructor
|
|
1349
1249
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1350
1250
|
*/
|
|
1351
|
-
function Hash
|
|
1251
|
+
function Hash(entries) {
|
|
1352
1252
|
var index = -1,
|
|
1353
1253
|
length = entries == null ? 0 : entries.length;
|
|
1354
1254
|
|
|
@@ -1360,13 +1260,13 @@
|
|
|
1360
1260
|
}
|
|
1361
1261
|
|
|
1362
1262
|
// Add methods to `Hash`.
|
|
1363
|
-
Hash
|
|
1364
|
-
Hash
|
|
1365
|
-
Hash
|
|
1366
|
-
Hash
|
|
1367
|
-
Hash
|
|
1263
|
+
Hash.prototype.clear = _hashClear;
|
|
1264
|
+
Hash.prototype['delete'] = _hashDelete;
|
|
1265
|
+
Hash.prototype.get = _hashGet;
|
|
1266
|
+
Hash.prototype.has = _hashHas;
|
|
1267
|
+
Hash.prototype.set = _hashSet;
|
|
1368
1268
|
|
|
1369
|
-
var _Hash = Hash
|
|
1269
|
+
var _Hash = Hash;
|
|
1370
1270
|
|
|
1371
1271
|
/**
|
|
1372
1272
|
* Removes all key-value entries from the list cache.
|
|
@@ -1375,12 +1275,12 @@
|
|
|
1375
1275
|
* @name clear
|
|
1376
1276
|
* @memberOf ListCache
|
|
1377
1277
|
*/
|
|
1378
|
-
function listCacheClear
|
|
1278
|
+
function listCacheClear() {
|
|
1379
1279
|
this.__data__ = [];
|
|
1380
1280
|
this.size = 0;
|
|
1381
1281
|
}
|
|
1382
1282
|
|
|
1383
|
-
var _listCacheClear = listCacheClear
|
|
1283
|
+
var _listCacheClear = listCacheClear;
|
|
1384
1284
|
|
|
1385
1285
|
/**
|
|
1386
1286
|
* Performs a
|
|
@@ -1414,13 +1314,11 @@
|
|
|
1414
1314
|
* _.eq(NaN, NaN);
|
|
1415
1315
|
* // => true
|
|
1416
1316
|
*/
|
|
1417
|
-
function eq
|
|
1317
|
+
function eq(value, other) {
|
|
1418
1318
|
return value === other || (value !== value && other !== other);
|
|
1419
1319
|
}
|
|
1420
1320
|
|
|
1421
|
-
var eq_1 = eq
|
|
1422
|
-
|
|
1423
|
-
var eq = eq_1;
|
|
1321
|
+
var eq_1 = eq;
|
|
1424
1322
|
|
|
1425
1323
|
/**
|
|
1426
1324
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
@@ -1430,19 +1328,17 @@
|
|
|
1430
1328
|
* @param {*} key The key to search for.
|
|
1431
1329
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1432
1330
|
*/
|
|
1433
|
-
function assocIndexOf
|
|
1331
|
+
function assocIndexOf(array, key) {
|
|
1434
1332
|
var length = array.length;
|
|
1435
1333
|
while (length--) {
|
|
1436
|
-
if (
|
|
1334
|
+
if (eq_1(array[length][0], key)) {
|
|
1437
1335
|
return length;
|
|
1438
1336
|
}
|
|
1439
1337
|
}
|
|
1440
1338
|
return -1;
|
|
1441
1339
|
}
|
|
1442
1340
|
|
|
1443
|
-
var _assocIndexOf = assocIndexOf
|
|
1444
|
-
|
|
1445
|
-
var assocIndexOf = _assocIndexOf;
|
|
1341
|
+
var _assocIndexOf = assocIndexOf;
|
|
1446
1342
|
|
|
1447
1343
|
/** Used for built-in method references. */
|
|
1448
1344
|
var arrayProto = Array.prototype;
|
|
@@ -1459,9 +1355,9 @@
|
|
|
1459
1355
|
* @param {string} key The key of the value to remove.
|
|
1460
1356
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1461
1357
|
*/
|
|
1462
|
-
function listCacheDelete
|
|
1358
|
+
function listCacheDelete(key) {
|
|
1463
1359
|
var data = this.__data__,
|
|
1464
|
-
index =
|
|
1360
|
+
index = _assocIndexOf(data, key);
|
|
1465
1361
|
|
|
1466
1362
|
if (index < 0) {
|
|
1467
1363
|
return false;
|
|
@@ -1476,7 +1372,7 @@
|
|
|
1476
1372
|
return true;
|
|
1477
1373
|
}
|
|
1478
1374
|
|
|
1479
|
-
var _listCacheDelete = listCacheDelete
|
|
1375
|
+
var _listCacheDelete = listCacheDelete;
|
|
1480
1376
|
|
|
1481
1377
|
/**
|
|
1482
1378
|
* Gets the list cache value for `key`.
|
|
@@ -1487,14 +1383,14 @@
|
|
|
1487
1383
|
* @param {string} key The key of the value to get.
|
|
1488
1384
|
* @returns {*} Returns the entry value.
|
|
1489
1385
|
*/
|
|
1490
|
-
function listCacheGet
|
|
1386
|
+
function listCacheGet(key) {
|
|
1491
1387
|
var data = this.__data__,
|
|
1492
|
-
index =
|
|
1388
|
+
index = _assocIndexOf(data, key);
|
|
1493
1389
|
|
|
1494
1390
|
return index < 0 ? undefined : data[index][1];
|
|
1495
1391
|
}
|
|
1496
1392
|
|
|
1497
|
-
var _listCacheGet = listCacheGet
|
|
1393
|
+
var _listCacheGet = listCacheGet;
|
|
1498
1394
|
|
|
1499
1395
|
/**
|
|
1500
1396
|
* Checks if a list cache value for `key` exists.
|
|
@@ -1505,11 +1401,11 @@
|
|
|
1505
1401
|
* @param {string} key The key of the entry to check.
|
|
1506
1402
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1507
1403
|
*/
|
|
1508
|
-
function listCacheHas
|
|
1509
|
-
return
|
|
1404
|
+
function listCacheHas(key) {
|
|
1405
|
+
return _assocIndexOf(this.__data__, key) > -1;
|
|
1510
1406
|
}
|
|
1511
1407
|
|
|
1512
|
-
var _listCacheHas = listCacheHas
|
|
1408
|
+
var _listCacheHas = listCacheHas;
|
|
1513
1409
|
|
|
1514
1410
|
/**
|
|
1515
1411
|
* Sets the list cache `key` to `value`.
|
|
@@ -1521,9 +1417,9 @@
|
|
|
1521
1417
|
* @param {*} value The value to set.
|
|
1522
1418
|
* @returns {Object} Returns the list cache instance.
|
|
1523
1419
|
*/
|
|
1524
|
-
function listCacheSet
|
|
1420
|
+
function listCacheSet(key, value) {
|
|
1525
1421
|
var data = this.__data__,
|
|
1526
|
-
index =
|
|
1422
|
+
index = _assocIndexOf(data, key);
|
|
1527
1423
|
|
|
1528
1424
|
if (index < 0) {
|
|
1529
1425
|
++this.size;
|
|
@@ -1534,17 +1430,7 @@
|
|
|
1534
1430
|
return this;
|
|
1535
1431
|
}
|
|
1536
1432
|
|
|
1537
|
-
var _listCacheSet = listCacheSet
|
|
1538
|
-
|
|
1539
|
-
var listCacheClear = _listCacheClear;
|
|
1540
|
-
|
|
1541
|
-
var listCacheDelete = _listCacheDelete;
|
|
1542
|
-
|
|
1543
|
-
var listCacheGet = _listCacheGet;
|
|
1544
|
-
|
|
1545
|
-
var listCacheHas = _listCacheHas;
|
|
1546
|
-
|
|
1547
|
-
var listCacheSet = _listCacheSet;
|
|
1433
|
+
var _listCacheSet = listCacheSet;
|
|
1548
1434
|
|
|
1549
1435
|
/**
|
|
1550
1436
|
* Creates an list cache object.
|
|
@@ -1553,7 +1439,7 @@
|
|
|
1553
1439
|
* @constructor
|
|
1554
1440
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1555
1441
|
*/
|
|
1556
|
-
function ListCache
|
|
1442
|
+
function ListCache(entries) {
|
|
1557
1443
|
var index = -1,
|
|
1558
1444
|
length = entries == null ? 0 : entries.length;
|
|
1559
1445
|
|
|
@@ -1565,17 +1451,13 @@
|
|
|
1565
1451
|
}
|
|
1566
1452
|
|
|
1567
1453
|
// Add methods to `ListCache`.
|
|
1568
|
-
ListCache
|
|
1569
|
-
ListCache
|
|
1570
|
-
ListCache
|
|
1571
|
-
ListCache
|
|
1572
|
-
ListCache
|
|
1573
|
-
|
|
1574
|
-
var _ListCache = ListCache$1;
|
|
1454
|
+
ListCache.prototype.clear = _listCacheClear;
|
|
1455
|
+
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1456
|
+
ListCache.prototype.get = _listCacheGet;
|
|
1457
|
+
ListCache.prototype.has = _listCacheHas;
|
|
1458
|
+
ListCache.prototype.set = _listCacheSet;
|
|
1575
1459
|
|
|
1576
|
-
var
|
|
1577
|
-
|
|
1578
|
-
var ListCache = _ListCache;
|
|
1460
|
+
var _ListCache = ListCache;
|
|
1579
1461
|
|
|
1580
1462
|
/**
|
|
1581
1463
|
* Removes all key-value entries from the map.
|
|
@@ -1584,16 +1466,16 @@
|
|
|
1584
1466
|
* @name clear
|
|
1585
1467
|
* @memberOf MapCache
|
|
1586
1468
|
*/
|
|
1587
|
-
function mapCacheClear
|
|
1469
|
+
function mapCacheClear() {
|
|
1588
1470
|
this.size = 0;
|
|
1589
1471
|
this.__data__ = {
|
|
1590
|
-
'hash': new
|
|
1591
|
-
'map': new (
|
|
1592
|
-
'string': new
|
|
1472
|
+
'hash': new _Hash,
|
|
1473
|
+
'map': new (_Map || _ListCache),
|
|
1474
|
+
'string': new _Hash
|
|
1593
1475
|
};
|
|
1594
1476
|
}
|
|
1595
1477
|
|
|
1596
|
-
var _mapCacheClear = mapCacheClear
|
|
1478
|
+
var _mapCacheClear = mapCacheClear;
|
|
1597
1479
|
|
|
1598
1480
|
/**
|
|
1599
1481
|
* Checks if `value` is suitable for use as unique object key.
|
|
@@ -1602,16 +1484,14 @@
|
|
|
1602
1484
|
* @param {*} value The value to check.
|
|
1603
1485
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1604
1486
|
*/
|
|
1605
|
-
function isKeyable
|
|
1487
|
+
function isKeyable(value) {
|
|
1606
1488
|
var type = typeof value;
|
|
1607
1489
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1608
1490
|
? (value !== '__proto__')
|
|
1609
1491
|
: (value === null);
|
|
1610
1492
|
}
|
|
1611
1493
|
|
|
1612
|
-
var _isKeyable = isKeyable
|
|
1613
|
-
|
|
1614
|
-
var isKeyable = _isKeyable;
|
|
1494
|
+
var _isKeyable = isKeyable;
|
|
1615
1495
|
|
|
1616
1496
|
/**
|
|
1617
1497
|
* Gets the data for `map`.
|
|
@@ -1621,16 +1501,14 @@
|
|
|
1621
1501
|
* @param {string} key The reference key.
|
|
1622
1502
|
* @returns {*} Returns the map data.
|
|
1623
1503
|
*/
|
|
1624
|
-
function getMapData
|
|
1504
|
+
function getMapData(map, key) {
|
|
1625
1505
|
var data = map.__data__;
|
|
1626
|
-
return
|
|
1506
|
+
return _isKeyable(key)
|
|
1627
1507
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1628
1508
|
: data.map;
|
|
1629
1509
|
}
|
|
1630
1510
|
|
|
1631
|
-
var _getMapData = getMapData
|
|
1632
|
-
|
|
1633
|
-
var getMapData = _getMapData;
|
|
1511
|
+
var _getMapData = getMapData;
|
|
1634
1512
|
|
|
1635
1513
|
/**
|
|
1636
1514
|
* Removes `key` and its value from the map.
|
|
@@ -1641,13 +1519,13 @@
|
|
|
1641
1519
|
* @param {string} key The key of the value to remove.
|
|
1642
1520
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1643
1521
|
*/
|
|
1644
|
-
function mapCacheDelete
|
|
1645
|
-
var result =
|
|
1522
|
+
function mapCacheDelete(key) {
|
|
1523
|
+
var result = _getMapData(this, key)['delete'](key);
|
|
1646
1524
|
this.size -= result ? 1 : 0;
|
|
1647
1525
|
return result;
|
|
1648
1526
|
}
|
|
1649
1527
|
|
|
1650
|
-
var _mapCacheDelete = mapCacheDelete
|
|
1528
|
+
var _mapCacheDelete = mapCacheDelete;
|
|
1651
1529
|
|
|
1652
1530
|
/**
|
|
1653
1531
|
* Gets the map value for `key`.
|
|
@@ -1658,11 +1536,11 @@
|
|
|
1658
1536
|
* @param {string} key The key of the value to get.
|
|
1659
1537
|
* @returns {*} Returns the entry value.
|
|
1660
1538
|
*/
|
|
1661
|
-
function mapCacheGet
|
|
1662
|
-
return
|
|
1539
|
+
function mapCacheGet(key) {
|
|
1540
|
+
return _getMapData(this, key).get(key);
|
|
1663
1541
|
}
|
|
1664
1542
|
|
|
1665
|
-
var _mapCacheGet = mapCacheGet
|
|
1543
|
+
var _mapCacheGet = mapCacheGet;
|
|
1666
1544
|
|
|
1667
1545
|
/**
|
|
1668
1546
|
* Checks if a map value for `key` exists.
|
|
@@ -1673,11 +1551,11 @@
|
|
|
1673
1551
|
* @param {string} key The key of the entry to check.
|
|
1674
1552
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1675
1553
|
*/
|
|
1676
|
-
function mapCacheHas
|
|
1677
|
-
return
|
|
1554
|
+
function mapCacheHas(key) {
|
|
1555
|
+
return _getMapData(this, key).has(key);
|
|
1678
1556
|
}
|
|
1679
1557
|
|
|
1680
|
-
var _mapCacheHas = mapCacheHas
|
|
1558
|
+
var _mapCacheHas = mapCacheHas;
|
|
1681
1559
|
|
|
1682
1560
|
/**
|
|
1683
1561
|
* Sets the map `key` to `value`.
|
|
@@ -1689,8 +1567,8 @@
|
|
|
1689
1567
|
* @param {*} value The value to set.
|
|
1690
1568
|
* @returns {Object} Returns the map cache instance.
|
|
1691
1569
|
*/
|
|
1692
|
-
function mapCacheSet
|
|
1693
|
-
var data =
|
|
1570
|
+
function mapCacheSet(key, value) {
|
|
1571
|
+
var data = _getMapData(this, key),
|
|
1694
1572
|
size = data.size;
|
|
1695
1573
|
|
|
1696
1574
|
data.set(key, value);
|
|
@@ -1698,17 +1576,7 @@
|
|
|
1698
1576
|
return this;
|
|
1699
1577
|
}
|
|
1700
1578
|
|
|
1701
|
-
var _mapCacheSet = mapCacheSet
|
|
1702
|
-
|
|
1703
|
-
var mapCacheClear = _mapCacheClear;
|
|
1704
|
-
|
|
1705
|
-
var mapCacheDelete = _mapCacheDelete;
|
|
1706
|
-
|
|
1707
|
-
var mapCacheGet = _mapCacheGet;
|
|
1708
|
-
|
|
1709
|
-
var mapCacheHas = _mapCacheHas;
|
|
1710
|
-
|
|
1711
|
-
var mapCacheSet = _mapCacheSet;
|
|
1579
|
+
var _mapCacheSet = mapCacheSet;
|
|
1712
1580
|
|
|
1713
1581
|
/**
|
|
1714
1582
|
* Creates a map cache object to store key-value pairs.
|
|
@@ -1717,7 +1585,7 @@
|
|
|
1717
1585
|
* @constructor
|
|
1718
1586
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
1719
1587
|
*/
|
|
1720
|
-
function MapCache
|
|
1588
|
+
function MapCache(entries) {
|
|
1721
1589
|
var index = -1,
|
|
1722
1590
|
length = entries == null ? 0 : entries.length;
|
|
1723
1591
|
|
|
@@ -1729,15 +1597,13 @@
|
|
|
1729
1597
|
}
|
|
1730
1598
|
|
|
1731
1599
|
// Add methods to `MapCache`.
|
|
1732
|
-
MapCache
|
|
1733
|
-
MapCache
|
|
1734
|
-
MapCache
|
|
1735
|
-
MapCache
|
|
1736
|
-
MapCache
|
|
1600
|
+
MapCache.prototype.clear = _mapCacheClear;
|
|
1601
|
+
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1602
|
+
MapCache.prototype.get = _mapCacheGet;
|
|
1603
|
+
MapCache.prototype.has = _mapCacheHas;
|
|
1604
|
+
MapCache.prototype.set = _mapCacheSet;
|
|
1737
1605
|
|
|
1738
|
-
var _MapCache = MapCache
|
|
1739
|
-
|
|
1740
|
-
var MapCache = _MapCache;
|
|
1606
|
+
var _MapCache = MapCache;
|
|
1741
1607
|
|
|
1742
1608
|
/** Error message constants. */
|
|
1743
1609
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
@@ -1786,7 +1652,7 @@
|
|
|
1786
1652
|
* // Replace `_.memoize.Cache`.
|
|
1787
1653
|
* _.memoize.Cache = WeakMap;
|
|
1788
1654
|
*/
|
|
1789
|
-
function memoize
|
|
1655
|
+
function memoize(func, resolver) {
|
|
1790
1656
|
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1791
1657
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1792
1658
|
}
|
|
@@ -1802,16 +1668,14 @@
|
|
|
1802
1668
|
memoized.cache = cache.set(key, result) || cache;
|
|
1803
1669
|
return result;
|
|
1804
1670
|
};
|
|
1805
|
-
memoized.cache = new (memoize
|
|
1671
|
+
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1806
1672
|
return memoized;
|
|
1807
1673
|
}
|
|
1808
1674
|
|
|
1809
1675
|
// Expose `MapCache`.
|
|
1810
|
-
memoize
|
|
1811
|
-
|
|
1812
|
-
var memoize_1 = memoize$1;
|
|
1676
|
+
memoize.Cache = _MapCache;
|
|
1813
1677
|
|
|
1814
|
-
var
|
|
1678
|
+
var memoize_1 = memoize;
|
|
1815
1679
|
|
|
1816
1680
|
/** Used as the maximum memoize cache size. */
|
|
1817
1681
|
var MAX_MEMOIZE_SIZE = 500;
|
|
@@ -1824,8 +1688,8 @@
|
|
|
1824
1688
|
* @param {Function} func The function to have its output memoized.
|
|
1825
1689
|
* @returns {Function} Returns the new memoized function.
|
|
1826
1690
|
*/
|
|
1827
|
-
function memoizeCapped
|
|
1828
|
-
var result =
|
|
1691
|
+
function memoizeCapped(func) {
|
|
1692
|
+
var result = memoize_1(func, function(key) {
|
|
1829
1693
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1830
1694
|
cache.clear();
|
|
1831
1695
|
}
|
|
@@ -1836,9 +1700,7 @@
|
|
|
1836
1700
|
return result;
|
|
1837
1701
|
}
|
|
1838
1702
|
|
|
1839
|
-
var _memoizeCapped = memoizeCapped
|
|
1840
|
-
|
|
1841
|
-
var memoizeCapped = _memoizeCapped;
|
|
1703
|
+
var _memoizeCapped = memoizeCapped;
|
|
1842
1704
|
|
|
1843
1705
|
/** Used to match property names within property paths. */
|
|
1844
1706
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
@@ -1853,7 +1715,7 @@
|
|
|
1853
1715
|
* @param {string} string The string to convert.
|
|
1854
1716
|
* @returns {Array} Returns the property path array.
|
|
1855
1717
|
*/
|
|
1856
|
-
var stringToPath
|
|
1718
|
+
var stringToPath = _memoizeCapped(function(string) {
|
|
1857
1719
|
var result = [];
|
|
1858
1720
|
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1859
1721
|
result.push('');
|
|
@@ -1864,7 +1726,7 @@
|
|
|
1864
1726
|
return result;
|
|
1865
1727
|
});
|
|
1866
1728
|
|
|
1867
|
-
var _stringToPath = stringToPath
|
|
1729
|
+
var _stringToPath = stringToPath;
|
|
1868
1730
|
|
|
1869
1731
|
/**
|
|
1870
1732
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -1875,7 +1737,7 @@
|
|
|
1875
1737
|
* @param {Function} iteratee The function invoked per iteration.
|
|
1876
1738
|
* @returns {Array} Returns the new mapped array.
|
|
1877
1739
|
*/
|
|
1878
|
-
function arrayMap
|
|
1740
|
+
function arrayMap(array, iteratee) {
|
|
1879
1741
|
var index = -1,
|
|
1880
1742
|
length = array == null ? 0 : array.length,
|
|
1881
1743
|
result = Array(length);
|
|
@@ -1886,15 +1748,13 @@
|
|
|
1886
1748
|
return result;
|
|
1887
1749
|
}
|
|
1888
1750
|
|
|
1889
|
-
var _arrayMap = arrayMap
|
|
1890
|
-
|
|
1891
|
-
var arrayMap = _arrayMap;
|
|
1751
|
+
var _arrayMap = arrayMap;
|
|
1892
1752
|
|
|
1893
1753
|
/** Used as references for various `Number` constants. */
|
|
1894
1754
|
var INFINITY$1 = 1 / 0;
|
|
1895
1755
|
|
|
1896
1756
|
/** Used to convert symbols to primitives and strings. */
|
|
1897
|
-
var symbolProto =
|
|
1757
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1898
1758
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1899
1759
|
|
|
1900
1760
|
/**
|
|
@@ -1905,25 +1765,23 @@
|
|
|
1905
1765
|
* @param {*} value The value to process.
|
|
1906
1766
|
* @returns {string} Returns the string.
|
|
1907
1767
|
*/
|
|
1908
|
-
function baseToString
|
|
1768
|
+
function baseToString(value) {
|
|
1909
1769
|
// Exit early for strings to avoid a performance hit in some environments.
|
|
1910
1770
|
if (typeof value == 'string') {
|
|
1911
1771
|
return value;
|
|
1912
1772
|
}
|
|
1913
1773
|
if (isArray_1(value)) {
|
|
1914
1774
|
// Recursively convert values (susceptible to call stack limits).
|
|
1915
|
-
return
|
|
1775
|
+
return _arrayMap(value, baseToString) + '';
|
|
1916
1776
|
}
|
|
1917
|
-
if (
|
|
1777
|
+
if (isSymbol_1(value)) {
|
|
1918
1778
|
return symbolToString ? symbolToString.call(value) : '';
|
|
1919
1779
|
}
|
|
1920
1780
|
var result = (value + '');
|
|
1921
1781
|
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1922
1782
|
}
|
|
1923
1783
|
|
|
1924
|
-
var _baseToString = baseToString
|
|
1925
|
-
|
|
1926
|
-
var baseToString = _baseToString;
|
|
1784
|
+
var _baseToString = baseToString;
|
|
1927
1785
|
|
|
1928
1786
|
/**
|
|
1929
1787
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
@@ -1946,17 +1804,11 @@
|
|
|
1946
1804
|
* _.toString([1, 2, 3]);
|
|
1947
1805
|
* // => '1,2,3'
|
|
1948
1806
|
*/
|
|
1949
|
-
function toString
|
|
1950
|
-
return value == null ? '' :
|
|
1807
|
+
function toString(value) {
|
|
1808
|
+
return value == null ? '' : _baseToString(value);
|
|
1951
1809
|
}
|
|
1952
1810
|
|
|
1953
|
-
var toString_1 = toString
|
|
1954
|
-
|
|
1955
|
-
var isKey = _isKey;
|
|
1956
|
-
|
|
1957
|
-
var stringToPath = _stringToPath;
|
|
1958
|
-
|
|
1959
|
-
var toString = toString_1;
|
|
1811
|
+
var toString_1 = toString;
|
|
1960
1812
|
|
|
1961
1813
|
/**
|
|
1962
1814
|
* Casts `value` to a path array if it's not one.
|
|
@@ -1966,14 +1818,14 @@
|
|
|
1966
1818
|
* @param {Object} [object] The object to query keys on.
|
|
1967
1819
|
* @returns {Array} Returns the cast property path array.
|
|
1968
1820
|
*/
|
|
1969
|
-
function castPath
|
|
1821
|
+
function castPath(value, object) {
|
|
1970
1822
|
if (isArray_1(value)) {
|
|
1971
1823
|
return value;
|
|
1972
1824
|
}
|
|
1973
|
-
return
|
|
1825
|
+
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1974
1826
|
}
|
|
1975
1827
|
|
|
1976
|
-
var _castPath = castPath
|
|
1828
|
+
var _castPath = castPath;
|
|
1977
1829
|
|
|
1978
1830
|
/** Used as references for various `Number` constants. */
|
|
1979
1831
|
var INFINITY = 1 / 0;
|
|
@@ -1985,19 +1837,15 @@
|
|
|
1985
1837
|
* @param {*} value The value to inspect.
|
|
1986
1838
|
* @returns {string|symbol} Returns the key.
|
|
1987
1839
|
*/
|
|
1988
|
-
function toKey
|
|
1989
|
-
if (typeof value == 'string' ||
|
|
1840
|
+
function toKey(value) {
|
|
1841
|
+
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1990
1842
|
return value;
|
|
1991
1843
|
}
|
|
1992
1844
|
var result = (value + '');
|
|
1993
1845
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1994
1846
|
}
|
|
1995
1847
|
|
|
1996
|
-
var _toKey = toKey
|
|
1997
|
-
|
|
1998
|
-
var castPath = _castPath;
|
|
1999
|
-
|
|
2000
|
-
var toKey = _toKey;
|
|
1848
|
+
var _toKey = toKey;
|
|
2001
1849
|
|
|
2002
1850
|
/**
|
|
2003
1851
|
* The base implementation of `_.get` without support for default values.
|
|
@@ -2007,21 +1855,19 @@
|
|
|
2007
1855
|
* @param {Array|string} path The path of the property to get.
|
|
2008
1856
|
* @returns {*} Returns the resolved value.
|
|
2009
1857
|
*/
|
|
2010
|
-
function baseGet
|
|
2011
|
-
path =
|
|
1858
|
+
function baseGet(object, path) {
|
|
1859
|
+
path = _castPath(path, object);
|
|
2012
1860
|
|
|
2013
1861
|
var index = 0,
|
|
2014
1862
|
length = path.length;
|
|
2015
1863
|
|
|
2016
1864
|
while (object != null && index < length) {
|
|
2017
|
-
object = object[
|
|
1865
|
+
object = object[_toKey(path[index++])];
|
|
2018
1866
|
}
|
|
2019
1867
|
return (index && index == length) ? object : undefined;
|
|
2020
1868
|
}
|
|
2021
1869
|
|
|
2022
|
-
var _baseGet = baseGet
|
|
2023
|
-
|
|
2024
|
-
var baseGet = _baseGet;
|
|
1870
|
+
var _baseGet = baseGet;
|
|
2025
1871
|
|
|
2026
1872
|
/**
|
|
2027
1873
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
@@ -2049,25 +1895,21 @@
|
|
|
2049
1895
|
* // => 'default'
|
|
2050
1896
|
*/
|
|
2051
1897
|
function get(object, path, defaultValue) {
|
|
2052
|
-
var result = object == null ? undefined :
|
|
1898
|
+
var result = object == null ? undefined : _baseGet(object, path);
|
|
2053
1899
|
return result === undefined ? defaultValue : result;
|
|
2054
1900
|
}
|
|
2055
1901
|
|
|
2056
1902
|
var get_1 = get;
|
|
2057
1903
|
|
|
2058
|
-
var
|
|
2059
|
-
|
|
2060
|
-
var defineProperty$1 = (function() {
|
|
1904
|
+
var defineProperty = (function() {
|
|
2061
1905
|
try {
|
|
2062
|
-
var func =
|
|
1906
|
+
var func = _getNative(Object, 'defineProperty');
|
|
2063
1907
|
func({}, '', {});
|
|
2064
1908
|
return func;
|
|
2065
1909
|
} catch (e) {}
|
|
2066
1910
|
}());
|
|
2067
1911
|
|
|
2068
|
-
var _defineProperty = defineProperty
|
|
2069
|
-
|
|
2070
|
-
var defineProperty = _defineProperty;
|
|
1912
|
+
var _defineProperty = defineProperty;
|
|
2071
1913
|
|
|
2072
1914
|
/**
|
|
2073
1915
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -2078,9 +1920,9 @@
|
|
|
2078
1920
|
* @param {string} key The key of the property to assign.
|
|
2079
1921
|
* @param {*} value The value to assign.
|
|
2080
1922
|
*/
|
|
2081
|
-
function baseAssignValue
|
|
2082
|
-
if (key == '__proto__' &&
|
|
2083
|
-
|
|
1923
|
+
function baseAssignValue(object, key, value) {
|
|
1924
|
+
if (key == '__proto__' && _defineProperty) {
|
|
1925
|
+
_defineProperty(object, key, {
|
|
2084
1926
|
'configurable': true,
|
|
2085
1927
|
'enumerable': true,
|
|
2086
1928
|
'value': value,
|
|
@@ -2091,9 +1933,7 @@
|
|
|
2091
1933
|
}
|
|
2092
1934
|
}
|
|
2093
1935
|
|
|
2094
|
-
var _baseAssignValue = baseAssignValue
|
|
2095
|
-
|
|
2096
|
-
var baseAssignValue = _baseAssignValue;
|
|
1936
|
+
var _baseAssignValue = baseAssignValue;
|
|
2097
1937
|
|
|
2098
1938
|
/** Used for built-in method references. */
|
|
2099
1939
|
var objectProto = Object.prototype;
|
|
@@ -2111,15 +1951,15 @@
|
|
|
2111
1951
|
* @param {string} key The key of the property to assign.
|
|
2112
1952
|
* @param {*} value The value to assign.
|
|
2113
1953
|
*/
|
|
2114
|
-
function assignValue
|
|
1954
|
+
function assignValue(object, key, value) {
|
|
2115
1955
|
var objValue = object[key];
|
|
2116
|
-
if (!(hasOwnProperty.call(object, key) &&
|
|
1956
|
+
if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) ||
|
|
2117
1957
|
(value === undefined && !(key in object))) {
|
|
2118
|
-
|
|
1958
|
+
_baseAssignValue(object, key, value);
|
|
2119
1959
|
}
|
|
2120
1960
|
}
|
|
2121
1961
|
|
|
2122
|
-
var _assignValue = assignValue
|
|
1962
|
+
var _assignValue = assignValue;
|
|
2123
1963
|
|
|
2124
1964
|
/** Used as references for various `Number` constants. */
|
|
2125
1965
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
@@ -2135,7 +1975,7 @@
|
|
|
2135
1975
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
2136
1976
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
2137
1977
|
*/
|
|
2138
|
-
function isIndex
|
|
1978
|
+
function isIndex(value, length) {
|
|
2139
1979
|
var type = typeof value;
|
|
2140
1980
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
2141
1981
|
|
|
@@ -2145,11 +1985,7 @@
|
|
|
2145
1985
|
(value > -1 && value % 1 == 0 && value < length);
|
|
2146
1986
|
}
|
|
2147
1987
|
|
|
2148
|
-
var _isIndex = isIndex
|
|
2149
|
-
|
|
2150
|
-
var assignValue = _assignValue;
|
|
2151
|
-
|
|
2152
|
-
var isIndex = _isIndex;
|
|
1988
|
+
var _isIndex = isIndex;
|
|
2153
1989
|
|
|
2154
1990
|
/**
|
|
2155
1991
|
* The base implementation of `_.set`.
|
|
@@ -2161,11 +1997,11 @@
|
|
|
2161
1997
|
* @param {Function} [customizer] The function to customize path creation.
|
|
2162
1998
|
* @returns {Object} Returns `object`.
|
|
2163
1999
|
*/
|
|
2164
|
-
function baseSet
|
|
2000
|
+
function baseSet(object, path, value, customizer) {
|
|
2165
2001
|
if (!isObject_1(object)) {
|
|
2166
2002
|
return object;
|
|
2167
2003
|
}
|
|
2168
|
-
path =
|
|
2004
|
+
path = _castPath(path, object);
|
|
2169
2005
|
|
|
2170
2006
|
var index = -1,
|
|
2171
2007
|
length = path.length,
|
|
@@ -2173,7 +2009,7 @@
|
|
|
2173
2009
|
nested = object;
|
|
2174
2010
|
|
|
2175
2011
|
while (nested != null && ++index < length) {
|
|
2176
|
-
var key =
|
|
2012
|
+
var key = _toKey(path[index]),
|
|
2177
2013
|
newValue = value;
|
|
2178
2014
|
|
|
2179
2015
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
@@ -2186,18 +2022,16 @@
|
|
|
2186
2022
|
if (newValue === undefined) {
|
|
2187
2023
|
newValue = isObject_1(objValue)
|
|
2188
2024
|
? objValue
|
|
2189
|
-
: (
|
|
2025
|
+
: (_isIndex(path[index + 1]) ? [] : {});
|
|
2190
2026
|
}
|
|
2191
2027
|
}
|
|
2192
|
-
|
|
2028
|
+
_assignValue(nested, key, newValue);
|
|
2193
2029
|
nested = nested[key];
|
|
2194
2030
|
}
|
|
2195
2031
|
return object;
|
|
2196
2032
|
}
|
|
2197
2033
|
|
|
2198
|
-
var _baseSet = baseSet
|
|
2199
|
-
|
|
2200
|
-
var baseSet = _baseSet;
|
|
2034
|
+
var _baseSet = baseSet;
|
|
2201
2035
|
|
|
2202
2036
|
/**
|
|
2203
2037
|
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
@@ -2228,25 +2062,23 @@
|
|
|
2228
2062
|
* // => 5
|
|
2229
2063
|
*/
|
|
2230
2064
|
function set(object, path, value) {
|
|
2231
|
-
return object == null ? object :
|
|
2065
|
+
return object == null ? object : _baseSet(object, path, value);
|
|
2232
2066
|
}
|
|
2233
2067
|
|
|
2234
2068
|
var set_1 = set;
|
|
2235
2069
|
|
|
2236
|
-
var set$1 = set_1;
|
|
2237
|
-
|
|
2238
2070
|
var _ = {
|
|
2239
|
-
isEmpty:
|
|
2240
|
-
isNull:
|
|
2241
|
-
isUndefined:
|
|
2242
|
-
isFunction:
|
|
2243
|
-
isObject:
|
|
2244
|
-
isString:
|
|
2245
|
-
isNumber:
|
|
2246
|
-
isArray:
|
|
2247
|
-
isRegExp:
|
|
2248
|
-
get:
|
|
2249
|
-
set:
|
|
2071
|
+
isEmpty: isEmpty_1,
|
|
2072
|
+
isNull: isNull_1,
|
|
2073
|
+
isUndefined: isUndefined_1,
|
|
2074
|
+
isFunction: isFunction_1,
|
|
2075
|
+
isObject: isObject_1,
|
|
2076
|
+
isString: isString_1,
|
|
2077
|
+
isNumber: isNumber_1,
|
|
2078
|
+
isArray: isArray_1,
|
|
2079
|
+
isRegExp: isRegExp_1,
|
|
2080
|
+
get: get_1,
|
|
2081
|
+
set: set_1
|
|
2250
2082
|
};
|
|
2251
2083
|
|
|
2252
2084
|
function Debug(name) {
|
|
@@ -2306,7 +2138,7 @@
|
|
|
2306
2138
|
ShareSheetType[ShareSheetType["video"] = 12] = "video";
|
|
2307
2139
|
ShareSheetType[ShareSheetType["link"] = 4] = "link";
|
|
2308
2140
|
ShareSheetType[ShareSheetType["oa"] = 5] = "oa";
|
|
2309
|
-
ShareSheetType[ShareSheetType["zmp"] =
|
|
2141
|
+
ShareSheetType[ShareSheetType["zmp"] = 20] = "zmp";
|
|
2310
2142
|
})(ShareSheetType || (ShareSheetType = {}));
|
|
2311
2143
|
var OrientationType;
|
|
2312
2144
|
(function (OrientationType) {
|
|
@@ -2338,8 +2170,6 @@
|
|
|
2338
2170
|
MediaPickerType[MediaPickerType["photo"] = 4] = "photo";
|
|
2339
2171
|
MediaPickerType[MediaPickerType["video"] = 5] = "video";
|
|
2340
2172
|
MediaPickerType[MediaPickerType["file"] = 6] = "file";
|
|
2341
|
-
MediaPickerType[MediaPickerType["multi_photo"] = 7] = "multi_photo";
|
|
2342
|
-
MediaPickerType[MediaPickerType["multi_video"] = 8] = "multi_video";
|
|
2343
2173
|
})(MediaPickerType || (MediaPickerType = {}));
|
|
2344
2174
|
|
|
2345
2175
|
const readCookie = (name) => {
|
|
@@ -2431,7 +2261,6 @@
|
|
|
2431
2261
|
'4G': isAndroid ? 13 : 2
|
|
2432
2262
|
});
|
|
2433
2263
|
const MEDIA_PICKER_LIMIT = 1 * MB;
|
|
2434
|
-
const MEDIA_PICKER_UPLOAD_SERVER = 'https://zapi-server.tungnt.xyz/upload/photos';
|
|
2435
2264
|
const ACTION = {
|
|
2436
2265
|
GET_DOWNLOADED_STICKER: {
|
|
2437
2266
|
name: 'action.get.downloaded.sticker',
|
|
@@ -2750,7 +2579,7 @@
|
|
|
2750
2579
|
},
|
|
2751
2580
|
PICK_MEDIA: {
|
|
2752
2581
|
name: 'action.pick.media',
|
|
2753
|
-
version_live: { iOS:
|
|
2582
|
+
version_live: { iOS: 440 }
|
|
2754
2583
|
},
|
|
2755
2584
|
MP_CLOSE_LOADINGVIEW: {
|
|
2756
2585
|
name: 'action.mp.close.loadingview'
|
|
@@ -3111,8 +2940,7 @@
|
|
|
3111
2940
|
getParameterByName: getParameterByName,
|
|
3112
2941
|
getParamsAsObject: getParamsAsObject,
|
|
3113
2942
|
toQueryString: toQueryString,
|
|
3114
|
-
};
|
|
3115
|
-
var queryString = QueryString;
|
|
2943
|
+
};
|
|
3116
2944
|
|
|
3117
2945
|
const REGEXP_SPECIAL_UNICODE = new RegExp('[\\u0300-\\u036f]', 'g');
|
|
3118
2946
|
const REGEXP_ACCENT_D = new RegExp('[đ|Đ]', 'g');
|
|
@@ -3434,7 +3262,7 @@
|
|
|
3434
3262
|
if (!_.isUndefined(currentVersion)) {
|
|
3435
3263
|
inputData.currentVersion = currentVersion;
|
|
3436
3264
|
}
|
|
3437
|
-
const api =
|
|
3265
|
+
const api = QueryString.appendToUrl(`${API_DOMAIN}${H5_API.GET_APP_INFO}`, inputData);
|
|
3438
3266
|
const msgApi = yield fetch(api, {
|
|
3439
3267
|
credentials: 'include'
|
|
3440
3268
|
});
|
|
@@ -3794,9 +3622,7 @@
|
|
|
3794
3622
|
}
|
|
3795
3623
|
});
|
|
3796
3624
|
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
class ZMPEEmitter extends EventEmitter {
|
|
3625
|
+
class ZMPEEmitter extends eventemitter3 {
|
|
3800
3626
|
constructor() {
|
|
3801
3627
|
super();
|
|
3802
3628
|
this.debug = Debug("zmp:event-emitter");
|
|
@@ -3908,9 +3734,9 @@
|
|
|
3908
3734
|
}
|
|
3909
3735
|
function execute(url, method, params, cb) {
|
|
3910
3736
|
params.suppress_http_code = 1;
|
|
3911
|
-
var data =
|
|
3737
|
+
var data = QueryString.encode(params);
|
|
3912
3738
|
if (method != 'post') {
|
|
3913
|
-
url =
|
|
3739
|
+
url = QueryString.appendToUrl(url, data);
|
|
3914
3740
|
data = '';
|
|
3915
3741
|
}
|
|
3916
3742
|
var request = createCORSRequest(method, url);
|
|
@@ -3941,10 +3767,9 @@
|
|
|
3941
3767
|
}
|
|
3942
3768
|
var CORSRequest = {
|
|
3943
3769
|
execute: execute
|
|
3944
|
-
};
|
|
3945
|
-
var CORSRequest$1 = CORSRequest;
|
|
3770
|
+
};
|
|
3946
3771
|
|
|
3947
|
-
class ZaloJSBridge extends
|
|
3772
|
+
class ZaloJSBridge extends eventemitter3 {
|
|
3948
3773
|
constructor() {
|
|
3949
3774
|
super();
|
|
3950
3775
|
this.debug = Debug('zmp:ZaloJSBridge');
|
|
@@ -3995,7 +3820,7 @@
|
|
|
3995
3820
|
}
|
|
3996
3821
|
sendLogData(data) {
|
|
3997
3822
|
try {
|
|
3998
|
-
CORSRequest
|
|
3823
|
+
CORSRequest.execute('https://h5.zalo.me/log/async', 'post', {
|
|
3999
3824
|
appId: window.APP_ID,
|
|
4000
3825
|
data: JSON.stringify(data)
|
|
4001
3826
|
}, (response) => { });
|
|
@@ -4236,7 +4061,7 @@
|
|
|
4236
4061
|
}
|
|
4237
4062
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4238
4063
|
|
|
4239
|
-
var version = "2.19.0
|
|
4064
|
+
var version = "2.19.0";
|
|
4240
4065
|
|
|
4241
4066
|
class Basics {
|
|
4242
4067
|
/**
|
|
@@ -4590,8 +4415,7 @@
|
|
|
4590
4415
|
}
|
|
4591
4416
|
}
|
|
4592
4417
|
_Logger_logLevel = new WeakMap(), _Logger_friendly = new WeakMap(), _Logger_content = new WeakMap(), _Logger_metric = new WeakMap(), _Logger_internalLog = new WeakMap();
|
|
4593
|
-
const logger = new Logger();
|
|
4594
|
-
var logger$1 = logger;
|
|
4418
|
+
const logger = new Logger();
|
|
4595
4419
|
|
|
4596
4420
|
class Device {
|
|
4597
4421
|
/**
|
|
@@ -4690,7 +4514,7 @@
|
|
|
4690
4514
|
callback(res);
|
|
4691
4515
|
})
|
|
4692
4516
|
.catch((error) => {
|
|
4693
|
-
logger
|
|
4517
|
+
logger.error(error, 'onNetworkStatusChange');
|
|
4694
4518
|
});
|
|
4695
4519
|
});
|
|
4696
4520
|
});
|
|
@@ -5188,6 +5012,18 @@
|
|
|
5188
5012
|
});
|
|
5189
5013
|
});
|
|
5190
5014
|
}
|
|
5015
|
+
/**
|
|
5016
|
+
* Open App Store.
|
|
5017
|
+
* @async
|
|
5018
|
+
* @function openAppStore
|
|
5019
|
+
* @category Device
|
|
5020
|
+
*
|
|
5021
|
+
*/
|
|
5022
|
+
static openAppStore(object) {
|
|
5023
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5024
|
+
return yield this.callNative(ACTION.OPEN_APPSTORE, object);
|
|
5025
|
+
});
|
|
5026
|
+
}
|
|
5191
5027
|
}
|
|
5192
5028
|
|
|
5193
5029
|
var _LocalResourceStorage_storage, _LocalResourceStorage_prefix, _LocalResourceStorage_resourceInfo;
|
|
@@ -5227,7 +5063,7 @@
|
|
|
5227
5063
|
}
|
|
5228
5064
|
}
|
|
5229
5065
|
catch (error) {
|
|
5230
|
-
logger
|
|
5066
|
+
logger.error(error, 'LocalResourceStorage > findAllCurrentDataByApp');
|
|
5231
5067
|
}
|
|
5232
5068
|
}
|
|
5233
5069
|
get(keys) {
|
|
@@ -5739,10 +5575,10 @@
|
|
|
5739
5575
|
* @category Window
|
|
5740
5576
|
*
|
|
5741
5577
|
*/
|
|
5742
|
-
static openWebview(
|
|
5578
|
+
static openWebview(url) {
|
|
5743
5579
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5744
5580
|
yield this.callNative(ACTION.OPEN_INAPP, {
|
|
5745
|
-
url:
|
|
5581
|
+
url: url
|
|
5746
5582
|
});
|
|
5747
5583
|
});
|
|
5748
5584
|
}
|
|
@@ -6190,12 +6026,12 @@
|
|
|
6190
6026
|
* @category Zalo
|
|
6191
6027
|
*
|
|
6192
6028
|
*/
|
|
6193
|
-
static openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6029
|
+
static openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6194
6030
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6195
6031
|
const uploadSetting = {
|
|
6196
6032
|
type: 0,
|
|
6197
|
-
url:
|
|
6198
|
-
maxSize: MEDIA_PICKER_LIMIT
|
|
6033
|
+
url: serverUpload,
|
|
6034
|
+
maxSize: maxItemSize || MEDIA_PICKER_LIMIT
|
|
6199
6035
|
};
|
|
6200
6036
|
const defaultEditView = {
|
|
6201
6037
|
enable: 1,
|
|
@@ -6210,11 +6046,10 @@
|
|
|
6210
6046
|
}, {
|
|
6211
6047
|
isMultiCallback: true,
|
|
6212
6048
|
callback: (nativeData, error) => {
|
|
6213
|
-
var _a
|
|
6049
|
+
var _a;
|
|
6214
6050
|
if (nativeData.error_code === 0) {
|
|
6215
|
-
const resultContent = stringToData((_a = nativeData.data) === null || _a === void 0 ? void 0 : _a.result_content);
|
|
6216
6051
|
const res = {
|
|
6217
|
-
|
|
6052
|
+
data: (_a = nativeData.data) === null || _a === void 0 ? void 0 : _a.result_content
|
|
6218
6053
|
};
|
|
6219
6054
|
return Promise.resolve(res);
|
|
6220
6055
|
}
|
|
@@ -6255,7 +6090,7 @@
|
|
|
6255
6090
|
try {
|
|
6256
6091
|
let searchString = new URL(url).searchParams.toString();
|
|
6257
6092
|
if (searchString) {
|
|
6258
|
-
result =
|
|
6093
|
+
result = QueryString.getParamsAsObject(searchString);
|
|
6259
6094
|
}
|
|
6260
6095
|
}
|
|
6261
6096
|
catch (err) {
|
|
@@ -6413,6 +6248,7 @@
|
|
|
6413
6248
|
this.openMediaPicker = Zalo.openMediaPicker;
|
|
6414
6249
|
this.openOutApp = Zalo.openOutApp;
|
|
6415
6250
|
this.closeLoading = Window.closeLoading;
|
|
6251
|
+
this.openAppStore = Device.openAppStore;
|
|
6416
6252
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuth, null, "f");
|
|
6417
6253
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuthVrf, null, "f");
|
|
6418
6254
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_accessToken, null, "f");
|
|
@@ -6828,8 +6664,8 @@
|
|
|
6828
6664
|
this.vibrate = () => {
|
|
6829
6665
|
return Promise.resolve();
|
|
6830
6666
|
};
|
|
6831
|
-
this.openWebview = (
|
|
6832
|
-
location.replace(
|
|
6667
|
+
this.openWebview = (url) => {
|
|
6668
|
+
location.replace(url);
|
|
6833
6669
|
return Promise.resolve();
|
|
6834
6670
|
};
|
|
6835
6671
|
this.getRouteParams = Routing.getRouteParams;
|
|
@@ -6873,6 +6709,9 @@
|
|
|
6873
6709
|
this.closeLoading = (when) => {
|
|
6874
6710
|
return Promise.resolve();
|
|
6875
6711
|
};
|
|
6712
|
+
this.openAppStore = (data) => {
|
|
6713
|
+
return Promise.resolve();
|
|
6714
|
+
};
|
|
6876
6715
|
}
|
|
6877
6716
|
on(event, fn, context) {
|
|
6878
6717
|
throw new Error('Method not implemented.');
|
|
@@ -6886,12 +6725,13 @@
|
|
|
6886
6725
|
removeAllListeners(event) {
|
|
6887
6726
|
throw new Error('Method not implemented.');
|
|
6888
6727
|
}
|
|
6889
|
-
openMediaPicker(type, editView, silentRequest, maxSelectItem) {
|
|
6728
|
+
openMediaPicker(type, serverUpload, maxItemSize, editView, silentRequest, maxSelectItem) {
|
|
6890
6729
|
console.warn('This api only works on zalo app');
|
|
6891
6730
|
return Promise.resolve({
|
|
6892
|
-
|
|
6731
|
+
data: ""
|
|
6893
6732
|
});
|
|
6894
6733
|
}
|
|
6734
|
+
;
|
|
6895
6735
|
}
|
|
6896
6736
|
_MockSDKService_appId = new WeakMap(), _MockSDKService_appConfig = new WeakMap(), _MockSDKService_zOAuth = new WeakMap(), _MockSDKService_accessToken = new WeakMap(), _MockSDKService_cache = new WeakMap(), _MockSDKService_loggedId = new WeakMap();
|
|
6897
6737
|
|
|
@@ -7343,7 +7183,12 @@
|
|
|
7343
7183
|
}
|
|
7344
7184
|
openWebview(object) {
|
|
7345
7185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7346
|
-
|
|
7186
|
+
const url = new URL(object.url);
|
|
7187
|
+
const typeInapp = url.searchParams.get('typeInapp');
|
|
7188
|
+
if (_.isEmpty(typeInapp)) {
|
|
7189
|
+
url.searchParams.set('typeInapp', '1');
|
|
7190
|
+
}
|
|
7191
|
+
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|
|
7347
7192
|
});
|
|
7348
7193
|
}
|
|
7349
7194
|
getRouteParams() {
|
|
@@ -7401,7 +7246,7 @@
|
|
|
7401
7246
|
users = uIds.map((item) => {
|
|
7402
7247
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7403
7248
|
return {
|
|
7404
|
-
id: ((_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.user_id_by_app) ||
|
|
7249
|
+
id: ((_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.user_id_by_app) || '',
|
|
7405
7250
|
profile: {
|
|
7406
7251
|
name: (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.name,
|
|
7407
7252
|
avatar: (_h = (_g = (_f = (_e = resData.data[item]) === null || _e === void 0 ? void 0 : _e.user_info) === null || _f === void 0 ? void 0 : _f.picture) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.url
|
|
@@ -7454,7 +7299,7 @@
|
|
|
7454
7299
|
editView.aspect_ratio = (_c = object.editView) === null || _c === void 0 ? void 0 : _c.aspectRatio;
|
|
7455
7300
|
const silentRequest = object.silentRequest === true ? 1 : 0;
|
|
7456
7301
|
const maxSelectItem = object.maxSelectItem;
|
|
7457
|
-
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, editView, silentRequest, maxSelectItem);
|
|
7302
|
+
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openMediaPicker(object.type, object.serverUploadUrl, object.maxItemSize, editView, silentRequest, maxSelectItem);
|
|
7458
7303
|
});
|
|
7459
7304
|
}
|
|
7460
7305
|
getShareableLink(object) {
|
|
@@ -7469,6 +7314,14 @@
|
|
|
7469
7314
|
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").closeLoading('user action');
|
|
7470
7315
|
});
|
|
7471
7316
|
}
|
|
7317
|
+
requestUpdateZalo(object) {
|
|
7318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7319
|
+
const appStoreURL = checkPlatform().isIOS
|
|
7320
|
+
? 'https://apps.apple.com/vn/app/zalo/id579523206'
|
|
7321
|
+
: 'https://play.google.com/store/apps/details?id=com.zing.zalo';
|
|
7322
|
+
return yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openOutApp(appStoreURL);
|
|
7323
|
+
});
|
|
7324
|
+
}
|
|
7472
7325
|
}
|
|
7473
7326
|
_SDKCreator_sdkService = new WeakMap();
|
|
7474
7327
|
__decorate([
|
|
@@ -7814,7 +7667,7 @@
|
|
|
7814
7667
|
handleError,
|
|
7815
7668
|
validate,
|
|
7816
7669
|
__param(0, checkType('object', {
|
|
7817
|
-
url: checkData('
|
|
7670
|
+
url: checkData('url')
|
|
7818
7671
|
}))
|
|
7819
7672
|
], SDKCreator.prototype, "openWebview", null);
|
|
7820
7673
|
__decorate([
|
|
@@ -7856,8 +7709,10 @@
|
|
|
7856
7709
|
validate,
|
|
7857
7710
|
__param(0, checkType('object', {
|
|
7858
7711
|
type: checkData('string', {
|
|
7859
|
-
values: ['photo', 'video', 'file'
|
|
7712
|
+
values: ['photo', 'video', 'file']
|
|
7860
7713
|
}),
|
|
7714
|
+
serverUploadUrl: checkData('url'),
|
|
7715
|
+
'maxItemSize?': checkData('number', { min: 0 }),
|
|
7861
7716
|
'editView?': checkData('object'),
|
|
7862
7717
|
'editView.enable?': checkData('boolean'),
|
|
7863
7718
|
'editView.aspectRatio?': checkData('string', { regex: /^\d+:\d+$/ }),
|
|
@@ -7881,6 +7736,10 @@
|
|
|
7881
7736
|
handleError,
|
|
7882
7737
|
validate
|
|
7883
7738
|
], SDKCreator.prototype, "closeLoading", null);
|
|
7739
|
+
__decorate([
|
|
7740
|
+
handleError,
|
|
7741
|
+
validate
|
|
7742
|
+
], SDKCreator.prototype, "requestUpdateZalo", null);
|
|
7884
7743
|
class ZaloMiniAppSDKCreator extends SDKCreator {
|
|
7885
7744
|
getServiceInstance() {
|
|
7886
7745
|
return ZaloMiniProgramSDKService.getInstance();
|
|
@@ -7946,13 +7805,16 @@
|
|
|
7946
7805
|
throw apiResponse.error.badRequest(resData.msg);
|
|
7947
7806
|
}
|
|
7948
7807
|
const orderId = resData.data.id;
|
|
7808
|
+
const jwt = resData.data.jwt;
|
|
7949
7809
|
const version = window.APP_VERSION;
|
|
7950
7810
|
const env = window.APP_ENV;
|
|
7951
7811
|
const params = {
|
|
7952
7812
|
miniAppId,
|
|
7953
|
-
accessToken: accessToken || '',
|
|
7954
7813
|
orderId,
|
|
7955
7814
|
};
|
|
7815
|
+
if (jwt) {
|
|
7816
|
+
params.token = jwt;
|
|
7817
|
+
}
|
|
7956
7818
|
if (version) {
|
|
7957
7819
|
params.version = version;
|
|
7958
7820
|
}
|
|
@@ -7962,7 +7824,7 @@
|
|
|
7962
7824
|
if (object.method) {
|
|
7963
7825
|
params.method = object.method;
|
|
7964
7826
|
}
|
|
7965
|
-
const buildURLQuery =
|
|
7827
|
+
const buildURLQuery = QueryString.encode(params);
|
|
7966
7828
|
const h5Url = new URL(`?${buildURLQuery}`, PAYMENT_H5_URL).toString();
|
|
7967
7829
|
yield sdk.openWebview({
|
|
7968
7830
|
url: h5Url,
|
|
@@ -7997,17 +7859,28 @@
|
|
|
7997
7859
|
id = inputData.appTransID || inputData.orderId || inputData.apptransid;
|
|
7998
7860
|
}
|
|
7999
7861
|
if (typeof inputData === 'string') {
|
|
8000
|
-
const orderId =
|
|
8001
|
-
const appTransID =
|
|
7862
|
+
const orderId = QueryString.getParameterByName("orderId", inputData);
|
|
7863
|
+
const appTransID = QueryString.getParameterByName("appTransID", inputData) || QueryString.getParameterByName("apptransid", inputData);
|
|
8002
7864
|
id = orderId || appTransID;
|
|
8003
7865
|
}
|
|
7866
|
+
const getConfig = {
|
|
7867
|
+
headers: {
|
|
7868
|
+
'authorization': `Bearer `
|
|
7869
|
+
}
|
|
7870
|
+
};
|
|
7871
|
+
const accessToken = yield sdk.getAccessToken({
|
|
7872
|
+
fail: (error) => {
|
|
7873
|
+
throw apiResponse.error.loginRequired;
|
|
7874
|
+
}
|
|
7875
|
+
});
|
|
7876
|
+
getConfig.headers.authorization = `Bearer ${accessToken}`;
|
|
8004
7877
|
const url = new URL(PAYMENT_APIS.GET_TRANSACTION);
|
|
8005
7878
|
const params = {
|
|
8006
7879
|
transId: id || "",
|
|
8007
7880
|
appId: __classPrivateFieldGet(this, _PaymentService_appId, "f")
|
|
8008
7881
|
};
|
|
8009
7882
|
url.search = new URLSearchParams(params).toString();
|
|
8010
|
-
const res = yield fetch(url.toString());
|
|
7883
|
+
const res = yield fetch(url.toString(), getConfig);
|
|
8011
7884
|
const resData = yield res.json();
|
|
8012
7885
|
if (!resData.data || resData.err !== 0) {
|
|
8013
7886
|
throw apiResponse.error.badRequest(resData.msg);
|
|
@@ -8028,47 +7901,6 @@
|
|
|
8028
7901
|
}
|
|
8029
7902
|
});
|
|
8030
7903
|
}
|
|
8031
|
-
/**
|
|
8032
|
-
* Truy vấn tình trạng một đơn hàng
|
|
8033
|
-
* @async
|
|
8034
|
-
* @function getOrderStatus
|
|
8035
|
-
* @category PaymentService
|
|
8036
|
-
* @returns {Promise<CallbackDataType.GetOrderStatusSuccessCallback>}
|
|
8037
|
-
*/
|
|
8038
|
-
getOrderStatus(object) {
|
|
8039
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
8040
|
-
try {
|
|
8041
|
-
const { orderId } = object;
|
|
8042
|
-
const url = new URL(PAYMENT_APIS.GET_ORDER_STATUS);
|
|
8043
|
-
const params = {
|
|
8044
|
-
appId: __classPrivateFieldGet(this, _PaymentService_appId, "f")
|
|
8045
|
-
};
|
|
8046
|
-
if (object.transId) {
|
|
8047
|
-
params.transId = object.transId;
|
|
8048
|
-
}
|
|
8049
|
-
if (object.orderId) {
|
|
8050
|
-
params.orderId = object.orderId;
|
|
8051
|
-
}
|
|
8052
|
-
url.search = new URLSearchParams(params).toString();
|
|
8053
|
-
const res = yield fetch(url.toString());
|
|
8054
|
-
const resData = yield res.json();
|
|
8055
|
-
if (!resData.data || resData.err !== 0) {
|
|
8056
|
-
throw apiResponse.error.badRequest(resData.msg);
|
|
8057
|
-
}
|
|
8058
|
-
const data = resData.data || {};
|
|
8059
|
-
const orderStatus = {
|
|
8060
|
-
returnCode: data.returnCode,
|
|
8061
|
-
returnMessage: data.returnMessage,
|
|
8062
|
-
isProcessing: data.isProcessing,
|
|
8063
|
-
amount: data.amount
|
|
8064
|
-
};
|
|
8065
|
-
return orderStatus;
|
|
8066
|
-
}
|
|
8067
|
-
catch (err) {
|
|
8068
|
-
throw err;
|
|
8069
|
-
}
|
|
8070
|
-
});
|
|
8071
|
-
}
|
|
8072
7904
|
}
|
|
8073
7905
|
_PaymentService_appId = new WeakMap();
|
|
8074
7906
|
|
|
@@ -8099,15 +7931,6 @@
|
|
|
8099
7931
|
};
|
|
8100
7932
|
return Promise.resolve(result);
|
|
8101
7933
|
}
|
|
8102
|
-
getOrderStatus(object) {
|
|
8103
|
-
const result = {
|
|
8104
|
-
returnCode: 3,
|
|
8105
|
-
returnMessage: 'Giao dịch chưa được thực hiện.',
|
|
8106
|
-
isProcessing: false,
|
|
8107
|
-
amount: 10000
|
|
8108
|
-
};
|
|
8109
|
-
return Promise.resolve(result);
|
|
8110
|
-
}
|
|
8111
7934
|
}
|
|
8112
7935
|
_MockPaymentService_appId = new WeakMap();
|
|
8113
7936
|
|
|
@@ -8141,17 +7964,6 @@
|
|
|
8141
7964
|
checkTransaction(object) {
|
|
8142
7965
|
return __classPrivateFieldGet(this, _PaymentCreator_instance, "f").checkTransaction(__classPrivateFieldGet(this, _PaymentCreator_sdk, "f"), object);
|
|
8143
7966
|
}
|
|
8144
|
-
/**
|
|
8145
|
-
* Khiểm tra trạng thái đơn hàng
|
|
8146
|
-
*
|
|
8147
|
-
* @async
|
|
8148
|
-
* @function getOrderStatus
|
|
8149
|
-
* @category Payment
|
|
8150
|
-
* @returns {Promise<CallbackDataType.GetOrderStatusSuccessCallback>}
|
|
8151
|
-
*/
|
|
8152
|
-
getOrderStatus(object) {
|
|
8153
|
-
return __classPrivateFieldGet(this, _PaymentCreator_instance, "f").getOrderStatus(object);
|
|
8154
|
-
}
|
|
8155
7967
|
}
|
|
8156
7968
|
_PaymentCreator_instance = new WeakMap(), _PaymentCreator_sdk = new WeakMap();
|
|
8157
7969
|
__decorate([
|
|
@@ -8167,16 +7979,6 @@
|
|
|
8167
7979
|
handleError,
|
|
8168
7980
|
validate
|
|
8169
7981
|
], PaymentCreator.prototype, "checkTransaction", null);
|
|
8170
|
-
__decorate([
|
|
8171
|
-
handleError,
|
|
8172
|
-
validate,
|
|
8173
|
-
__param(0, required(['transId'], { if: { orderId: undefined } })),
|
|
8174
|
-
__param(0, required(['orderId'], { if: { transId: undefined } })),
|
|
8175
|
-
__param(0, checkType('object', {
|
|
8176
|
-
'transId?': checkData('string'),
|
|
8177
|
-
'orderId?': checkData('string'),
|
|
8178
|
-
}))
|
|
8179
|
-
], PaymentCreator.prototype, "getOrderStatus", null);
|
|
8180
7982
|
class ZaloMiniAppPaymentCreator extends PaymentCreator {
|
|
8181
7983
|
getInstance() {
|
|
8182
7984
|
return PaymentService.getInstance();
|