@izzai/one-js 1.1.21 → 1.1.23

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/index.js CHANGED
@@ -4244,1660 +4244,13 @@ class AgentService extends BaseService {
4244
4244
  }
4245
4245
  }
4246
4246
 
4247
- /**
4248
- * This method returns the first argument it receives.
4249
- *
4250
- * @static
4251
- * @since 0.1.0
4252
- * @memberOf _
4253
- * @category Util
4254
- * @param {*} value Any value.
4255
- * @returns {*} Returns `value`.
4256
- * @example
4257
- *
4258
- * var object = { 'a': 1 };
4259
- *
4260
- * console.log(_.identity(object) === object);
4261
- * // => true
4262
- */
4263
-
4264
- var identity_1;
4265
- var hasRequiredIdentity;
4266
-
4267
- function requireIdentity () {
4268
- if (hasRequiredIdentity) return identity_1;
4269
- hasRequiredIdentity = 1;
4270
- function identity(value) {
4271
- return value;
4272
- }
4273
-
4274
- identity_1 = identity;
4275
- return identity_1;
4276
- }
4277
-
4278
- /**
4279
- * A faster alternative to `Function#apply`, this function invokes `func`
4280
- * with the `this` binding of `thisArg` and the arguments of `args`.
4281
- *
4282
- * @private
4283
- * @param {Function} func The function to invoke.
4284
- * @param {*} thisArg The `this` binding of `func`.
4285
- * @param {Array} args The arguments to invoke `func` with.
4286
- * @returns {*} Returns the result of `func`.
4287
- */
4288
-
4289
- var _apply;
4290
- var hasRequired_apply;
4291
-
4292
- function require_apply () {
4293
- if (hasRequired_apply) return _apply;
4294
- hasRequired_apply = 1;
4295
- function apply(func, thisArg, args) {
4296
- switch (args.length) {
4297
- case 0: return func.call(thisArg);
4298
- case 1: return func.call(thisArg, args[0]);
4299
- case 2: return func.call(thisArg, args[0], args[1]);
4300
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
4301
- }
4302
- return func.apply(thisArg, args);
4303
- }
4304
-
4305
- _apply = apply;
4306
- return _apply;
4307
- }
4308
-
4309
- var _overRest;
4310
- var hasRequired_overRest;
4311
-
4312
- function require_overRest () {
4313
- if (hasRequired_overRest) return _overRest;
4314
- hasRequired_overRest = 1;
4315
- var apply = require_apply();
4316
-
4317
- /* Built-in method references for those with the same name as other `lodash` methods. */
4318
- var nativeMax = Math.max;
4319
-
4320
- /**
4321
- * A specialized version of `baseRest` which transforms the rest array.
4322
- *
4323
- * @private
4324
- * @param {Function} func The function to apply a rest parameter to.
4325
- * @param {number} [start=func.length-1] The start position of the rest parameter.
4326
- * @param {Function} transform The rest array transform.
4327
- * @returns {Function} Returns the new function.
4328
- */
4329
- function overRest(func, start, transform) {
4330
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
4331
- return function() {
4332
- var args = arguments,
4333
- index = -1,
4334
- length = nativeMax(args.length - start, 0),
4335
- array = Array(length);
4336
-
4337
- while (++index < length) {
4338
- array[index] = args[start + index];
4339
- }
4340
- index = -1;
4341
- var otherArgs = Array(start + 1);
4342
- while (++index < start) {
4343
- otherArgs[index] = args[index];
4344
- }
4345
- otherArgs[start] = transform(array);
4346
- return apply(func, this, otherArgs);
4347
- };
4348
- }
4349
-
4350
- _overRest = overRest;
4351
- return _overRest;
4352
- }
4353
-
4354
- /**
4355
- * Creates a function that returns `value`.
4356
- *
4357
- * @static
4358
- * @memberOf _
4359
- * @since 2.4.0
4360
- * @category Util
4361
- * @param {*} value The value to return from the new function.
4362
- * @returns {Function} Returns the new constant function.
4363
- * @example
4364
- *
4365
- * var objects = _.times(2, _.constant({ 'a': 1 }));
4366
- *
4367
- * console.log(objects);
4368
- * // => [{ 'a': 1 }, { 'a': 1 }]
4369
- *
4370
- * console.log(objects[0] === objects[1]);
4371
- * // => true
4372
- */
4373
-
4374
- var constant_1;
4375
- var hasRequiredConstant;
4376
-
4377
- function requireConstant () {
4378
- if (hasRequiredConstant) return constant_1;
4379
- hasRequiredConstant = 1;
4380
- function constant(value) {
4381
- return function() {
4382
- return value;
4383
- };
4384
- }
4385
-
4386
- constant_1 = constant;
4387
- return constant_1;
4388
- }
4389
-
4390
- /** Detect free variable `global` from Node.js. */
4391
-
4392
- var _freeGlobal;
4393
- var hasRequired_freeGlobal;
4394
-
4395
- function require_freeGlobal () {
4396
- if (hasRequired_freeGlobal) return _freeGlobal;
4397
- hasRequired_freeGlobal = 1;
4398
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
4399
-
4400
- _freeGlobal = freeGlobal;
4401
- return _freeGlobal;
4402
- }
4403
-
4404
- var _root;
4405
- var hasRequired_root;
4406
-
4407
- function require_root () {
4408
- if (hasRequired_root) return _root;
4409
- hasRequired_root = 1;
4410
- var freeGlobal = require_freeGlobal();
4411
-
4412
- /** Detect free variable `self`. */
4413
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4414
-
4415
- /** Used as a reference to the global object. */
4416
- var root = freeGlobal || freeSelf || Function('return this')();
4417
-
4418
- _root = root;
4419
- return _root;
4420
- }
4421
-
4422
- var _Symbol;
4423
- var hasRequired_Symbol;
4424
-
4425
- function require_Symbol () {
4426
- if (hasRequired_Symbol) return _Symbol;
4427
- hasRequired_Symbol = 1;
4428
- var root = require_root();
4429
-
4430
- /** Built-in value references. */
4431
- var Symbol = root.Symbol;
4432
-
4433
- _Symbol = Symbol;
4434
- return _Symbol;
4435
- }
4436
-
4437
- var _getRawTag;
4438
- var hasRequired_getRawTag;
4439
-
4440
- function require_getRawTag () {
4441
- if (hasRequired_getRawTag) return _getRawTag;
4442
- hasRequired_getRawTag = 1;
4443
- var Symbol = require_Symbol();
4444
-
4445
- /** Used for built-in method references. */
4446
- var objectProto = Object.prototype;
4447
-
4448
- /** Used to check objects for own properties. */
4449
- var hasOwnProperty = objectProto.hasOwnProperty;
4450
-
4451
- /**
4452
- * Used to resolve the
4453
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4454
- * of values.
4455
- */
4456
- var nativeObjectToString = objectProto.toString;
4457
-
4458
- /** Built-in value references. */
4459
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4460
-
4461
- /**
4462
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
4463
- *
4464
- * @private
4465
- * @param {*} value The value to query.
4466
- * @returns {string} Returns the raw `toStringTag`.
4467
- */
4468
- function getRawTag(value) {
4469
- var isOwn = hasOwnProperty.call(value, symToStringTag),
4470
- tag = value[symToStringTag];
4471
-
4472
- try {
4473
- value[symToStringTag] = undefined;
4474
- var unmasked = true;
4475
- } catch (e) {}
4476
-
4477
- var result = nativeObjectToString.call(value);
4478
- if (unmasked) {
4479
- if (isOwn) {
4480
- value[symToStringTag] = tag;
4481
- } else {
4482
- delete value[symToStringTag];
4483
- }
4484
- }
4485
- return result;
4486
- }
4487
-
4488
- _getRawTag = getRawTag;
4489
- return _getRawTag;
4490
- }
4491
-
4492
- /** Used for built-in method references. */
4493
-
4494
- var _objectToString;
4495
- var hasRequired_objectToString;
4496
-
4497
- function require_objectToString () {
4498
- if (hasRequired_objectToString) return _objectToString;
4499
- hasRequired_objectToString = 1;
4500
- var objectProto = Object.prototype;
4501
-
4502
- /**
4503
- * Used to resolve the
4504
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4505
- * of values.
4506
- */
4507
- var nativeObjectToString = objectProto.toString;
4508
-
4509
- /**
4510
- * Converts `value` to a string using `Object.prototype.toString`.
4511
- *
4512
- * @private
4513
- * @param {*} value The value to convert.
4514
- * @returns {string} Returns the converted string.
4515
- */
4516
- function objectToString(value) {
4517
- return nativeObjectToString.call(value);
4518
- }
4519
-
4520
- _objectToString = objectToString;
4521
- return _objectToString;
4522
- }
4523
-
4524
- var _baseGetTag;
4525
- var hasRequired_baseGetTag;
4526
-
4527
- function require_baseGetTag () {
4528
- if (hasRequired_baseGetTag) return _baseGetTag;
4529
- hasRequired_baseGetTag = 1;
4530
- var Symbol = require_Symbol(),
4531
- getRawTag = require_getRawTag(),
4532
- objectToString = require_objectToString();
4533
-
4534
- /** `Object#toString` result references. */
4535
- var nullTag = '[object Null]',
4536
- undefinedTag = '[object Undefined]';
4537
-
4538
- /** Built-in value references. */
4539
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4540
-
4541
- /**
4542
- * The base implementation of `getTag` without fallbacks for buggy environments.
4543
- *
4544
- * @private
4545
- * @param {*} value The value to query.
4546
- * @returns {string} Returns the `toStringTag`.
4547
- */
4548
- function baseGetTag(value) {
4549
- if (value == null) {
4550
- return value === undefined ? undefinedTag : nullTag;
4551
- }
4552
- return (symToStringTag && symToStringTag in Object(value))
4553
- ? getRawTag(value)
4554
- : objectToString(value);
4555
- }
4556
-
4557
- _baseGetTag = baseGetTag;
4558
- return _baseGetTag;
4559
- }
4560
-
4561
- /**
4562
- * Checks if `value` is the
4563
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4564
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4565
- *
4566
- * @static
4567
- * @memberOf _
4568
- * @since 0.1.0
4569
- * @category Lang
4570
- * @param {*} value The value to check.
4571
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4572
- * @example
4573
- *
4574
- * _.isObject({});
4575
- * // => true
4576
- *
4577
- * _.isObject([1, 2, 3]);
4578
- * // => true
4579
- *
4580
- * _.isObject(_.noop);
4581
- * // => true
4582
- *
4583
- * _.isObject(null);
4584
- * // => false
4585
- */
4586
-
4587
- var isObject_1;
4588
- var hasRequiredIsObject;
4589
-
4590
- function requireIsObject () {
4591
- if (hasRequiredIsObject) return isObject_1;
4592
- hasRequiredIsObject = 1;
4593
- function isObject(value) {
4594
- var type = typeof value;
4595
- return value != null && (type == 'object' || type == 'function');
4596
- }
4597
-
4598
- isObject_1 = isObject;
4599
- return isObject_1;
4600
- }
4601
-
4602
- var isFunction_1;
4603
- var hasRequiredIsFunction;
4604
-
4605
- function requireIsFunction () {
4606
- if (hasRequiredIsFunction) return isFunction_1;
4607
- hasRequiredIsFunction = 1;
4608
- var baseGetTag = require_baseGetTag(),
4609
- isObject = requireIsObject();
4610
-
4611
- /** `Object#toString` result references. */
4612
- var asyncTag = '[object AsyncFunction]',
4613
- funcTag = '[object Function]',
4614
- genTag = '[object GeneratorFunction]',
4615
- proxyTag = '[object Proxy]';
4616
-
4617
- /**
4618
- * Checks if `value` is classified as a `Function` object.
4619
- *
4620
- * @static
4621
- * @memberOf _
4622
- * @since 0.1.0
4623
- * @category Lang
4624
- * @param {*} value The value to check.
4625
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
4626
- * @example
4627
- *
4628
- * _.isFunction(_);
4629
- * // => true
4630
- *
4631
- * _.isFunction(/abc/);
4632
- * // => false
4633
- */
4634
- function isFunction(value) {
4635
- if (!isObject(value)) {
4636
- return false;
4637
- }
4638
- // The use of `Object#toString` avoids issues with the `typeof` operator
4639
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
4640
- var tag = baseGetTag(value);
4641
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
4642
- }
4643
-
4644
- isFunction_1 = isFunction;
4645
- return isFunction_1;
4646
- }
4647
-
4648
- var _coreJsData;
4649
- var hasRequired_coreJsData;
4650
-
4651
- function require_coreJsData () {
4652
- if (hasRequired_coreJsData) return _coreJsData;
4653
- hasRequired_coreJsData = 1;
4654
- var root = require_root();
4655
-
4656
- /** Used to detect overreaching core-js shims. */
4657
- var coreJsData = root['__core-js_shared__'];
4658
-
4659
- _coreJsData = coreJsData;
4660
- return _coreJsData;
4661
- }
4662
-
4663
- var _isMasked;
4664
- var hasRequired_isMasked;
4665
-
4666
- function require_isMasked () {
4667
- if (hasRequired_isMasked) return _isMasked;
4668
- hasRequired_isMasked = 1;
4669
- var coreJsData = require_coreJsData();
4670
-
4671
- /** Used to detect methods masquerading as native. */
4672
- var maskSrcKey = (function() {
4673
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
4674
- return uid ? ('Symbol(src)_1.' + uid) : '';
4675
- }());
4676
-
4677
- /**
4678
- * Checks if `func` has its source masked.
4679
- *
4680
- * @private
4681
- * @param {Function} func The function to check.
4682
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4683
- */
4684
- function isMasked(func) {
4685
- return !!maskSrcKey && (maskSrcKey in func);
4686
- }
4687
-
4688
- _isMasked = isMasked;
4689
- return _isMasked;
4690
- }
4691
-
4692
- /** Used for built-in method references. */
4693
-
4694
- var _toSource;
4695
- var hasRequired_toSource;
4696
-
4697
- function require_toSource () {
4698
- if (hasRequired_toSource) return _toSource;
4699
- hasRequired_toSource = 1;
4700
- var funcProto = Function.prototype;
4701
-
4702
- /** Used to resolve the decompiled source of functions. */
4703
- var funcToString = funcProto.toString;
4704
-
4705
- /**
4706
- * Converts `func` to its source code.
4707
- *
4708
- * @private
4709
- * @param {Function} func The function to convert.
4710
- * @returns {string} Returns the source code.
4711
- */
4712
- function toSource(func) {
4713
- if (func != null) {
4714
- try {
4715
- return funcToString.call(func);
4716
- } catch (e) {}
4717
- try {
4718
- return (func + '');
4719
- } catch (e) {}
4720
- }
4721
- return '';
4722
- }
4723
-
4724
- _toSource = toSource;
4725
- return _toSource;
4726
- }
4727
-
4728
- var _baseIsNative;
4729
- var hasRequired_baseIsNative;
4730
-
4731
- function require_baseIsNative () {
4732
- if (hasRequired_baseIsNative) return _baseIsNative;
4733
- hasRequired_baseIsNative = 1;
4734
- var isFunction = requireIsFunction(),
4735
- isMasked = require_isMasked(),
4736
- isObject = requireIsObject(),
4737
- toSource = require_toSource();
4738
-
4739
- /**
4740
- * Used to match `RegExp`
4741
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
4742
- */
4743
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
4744
-
4745
- /** Used to detect host constructors (Safari). */
4746
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
4747
-
4748
- /** Used for built-in method references. */
4749
- var funcProto = Function.prototype,
4750
- objectProto = Object.prototype;
4751
-
4752
- /** Used to resolve the decompiled source of functions. */
4753
- var funcToString = funcProto.toString;
4754
-
4755
- /** Used to check objects for own properties. */
4756
- var hasOwnProperty = objectProto.hasOwnProperty;
4757
-
4758
- /** Used to detect if a method is native. */
4759
- var reIsNative = RegExp('^' +
4760
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
4761
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
4762
- );
4763
-
4764
- /**
4765
- * The base implementation of `_.isNative` without bad shim checks.
4766
- *
4767
- * @private
4768
- * @param {*} value The value to check.
4769
- * @returns {boolean} Returns `true` if `value` is a native function,
4770
- * else `false`.
4771
- */
4772
- function baseIsNative(value) {
4773
- if (!isObject(value) || isMasked(value)) {
4774
- return false;
4775
- }
4776
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
4777
- return pattern.test(toSource(value));
4778
- }
4779
-
4780
- _baseIsNative = baseIsNative;
4781
- return _baseIsNative;
4782
- }
4783
-
4784
- /**
4785
- * Gets the value at `key` of `object`.
4786
- *
4787
- * @private
4788
- * @param {Object} [object] The object to query.
4789
- * @param {string} key The key of the property to get.
4790
- * @returns {*} Returns the property value.
4791
- */
4792
-
4793
- var _getValue;
4794
- var hasRequired_getValue;
4795
-
4796
- function require_getValue () {
4797
- if (hasRequired_getValue) return _getValue;
4798
- hasRequired_getValue = 1;
4799
- function getValue(object, key) {
4800
- return object == null ? undefined : object[key];
4801
- }
4802
-
4803
- _getValue = getValue;
4804
- return _getValue;
4805
- }
4806
-
4807
- var _getNative;
4808
- var hasRequired_getNative;
4809
-
4810
- function require_getNative () {
4811
- if (hasRequired_getNative) return _getNative;
4812
- hasRequired_getNative = 1;
4813
- var baseIsNative = require_baseIsNative(),
4814
- getValue = require_getValue();
4815
-
4816
- /**
4817
- * Gets the native function at `key` of `object`.
4818
- *
4819
- * @private
4820
- * @param {Object} object The object to query.
4821
- * @param {string} key The key of the method to get.
4822
- * @returns {*} Returns the function if it's native, else `undefined`.
4823
- */
4824
- function getNative(object, key) {
4825
- var value = getValue(object, key);
4826
- return baseIsNative(value) ? value : undefined;
4827
- }
4828
-
4829
- _getNative = getNative;
4830
- return _getNative;
4831
- }
4832
-
4833
- var _defineProperty;
4834
- var hasRequired_defineProperty;
4835
-
4836
- function require_defineProperty () {
4837
- if (hasRequired_defineProperty) return _defineProperty;
4838
- hasRequired_defineProperty = 1;
4839
- var getNative = require_getNative();
4840
-
4841
- var defineProperty = (function() {
4842
- try {
4843
- var func = getNative(Object, 'defineProperty');
4844
- func({}, '', {});
4845
- return func;
4846
- } catch (e) {}
4847
- }());
4848
-
4849
- _defineProperty = defineProperty;
4850
- return _defineProperty;
4851
- }
4852
-
4853
- var _baseSetToString;
4854
- var hasRequired_baseSetToString;
4855
-
4856
- function require_baseSetToString () {
4857
- if (hasRequired_baseSetToString) return _baseSetToString;
4858
- hasRequired_baseSetToString = 1;
4859
- var constant = requireConstant(),
4860
- defineProperty = require_defineProperty(),
4861
- identity = requireIdentity();
4862
-
4863
- /**
4864
- * The base implementation of `setToString` without support for hot loop shorting.
4865
- *
4866
- * @private
4867
- * @param {Function} func The function to modify.
4868
- * @param {Function} string The `toString` result.
4869
- * @returns {Function} Returns `func`.
4870
- */
4871
- var baseSetToString = !defineProperty ? identity : function(func, string) {
4872
- return defineProperty(func, 'toString', {
4873
- 'configurable': true,
4874
- 'enumerable': false,
4875
- 'value': constant(string),
4876
- 'writable': true
4877
- });
4878
- };
4879
-
4880
- _baseSetToString = baseSetToString;
4881
- return _baseSetToString;
4882
- }
4883
-
4884
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
4885
-
4886
- var _shortOut;
4887
- var hasRequired_shortOut;
4888
-
4889
- function require_shortOut () {
4890
- if (hasRequired_shortOut) return _shortOut;
4891
- hasRequired_shortOut = 1;
4892
- var HOT_COUNT = 800,
4893
- HOT_SPAN = 16;
4894
-
4895
- /* Built-in method references for those with the same name as other `lodash` methods. */
4896
- var nativeNow = Date.now;
4897
-
4898
- /**
4899
- * Creates a function that'll short out and invoke `identity` instead
4900
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4901
- * milliseconds.
4902
- *
4903
- * @private
4904
- * @param {Function} func The function to restrict.
4905
- * @returns {Function} Returns the new shortable function.
4906
- */
4907
- function shortOut(func) {
4908
- var count = 0,
4909
- lastCalled = 0;
4910
-
4911
- return function() {
4912
- var stamp = nativeNow(),
4913
- remaining = HOT_SPAN - (stamp - lastCalled);
4914
-
4915
- lastCalled = stamp;
4916
- if (remaining > 0) {
4917
- if (++count >= HOT_COUNT) {
4918
- return arguments[0];
4919
- }
4920
- } else {
4921
- count = 0;
4922
- }
4923
- return func.apply(undefined, arguments);
4924
- };
4925
- }
4926
-
4927
- _shortOut = shortOut;
4928
- return _shortOut;
4929
- }
4930
-
4931
- var _setToString;
4932
- var hasRequired_setToString;
4933
-
4934
- function require_setToString () {
4935
- if (hasRequired_setToString) return _setToString;
4936
- hasRequired_setToString = 1;
4937
- var baseSetToString = require_baseSetToString(),
4938
- shortOut = require_shortOut();
4939
-
4940
- /**
4941
- * Sets the `toString` method of `func` to return `string`.
4942
- *
4943
- * @private
4944
- * @param {Function} func The function to modify.
4945
- * @param {Function} string The `toString` result.
4946
- * @returns {Function} Returns `func`.
4947
- */
4948
- var setToString = shortOut(baseSetToString);
4949
-
4950
- _setToString = setToString;
4951
- return _setToString;
4952
- }
4953
-
4954
- var _baseRest;
4955
- var hasRequired_baseRest;
4956
-
4957
- function require_baseRest () {
4958
- if (hasRequired_baseRest) return _baseRest;
4959
- hasRequired_baseRest = 1;
4960
- var identity = requireIdentity(),
4961
- overRest = require_overRest(),
4962
- setToString = require_setToString();
4963
-
4964
- /**
4965
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
4966
- *
4967
- * @private
4968
- * @param {Function} func The function to apply a rest parameter to.
4969
- * @param {number} [start=func.length-1] The start position of the rest parameter.
4970
- * @returns {Function} Returns the new function.
4971
- */
4972
- function baseRest(func, start) {
4973
- return setToString(overRest(func, start, identity), func + '');
4974
- }
4975
-
4976
- _baseRest = baseRest;
4977
- return _baseRest;
4978
- }
4979
-
4980
- /**
4981
- * Performs a
4982
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4983
- * comparison between two values to determine if they are equivalent.
4984
- *
4985
- * @static
4986
- * @memberOf _
4987
- * @since 4.0.0
4988
- * @category Lang
4989
- * @param {*} value The value to compare.
4990
- * @param {*} other The other value to compare.
4991
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4992
- * @example
4993
- *
4994
- * var object = { 'a': 1 };
4995
- * var other = { 'a': 1 };
4996
- *
4997
- * _.eq(object, object);
4998
- * // => true
4999
- *
5000
- * _.eq(object, other);
5001
- * // => false
5002
- *
5003
- * _.eq('a', 'a');
5004
- * // => true
5005
- *
5006
- * _.eq('a', Object('a'));
5007
- * // => false
5008
- *
5009
- * _.eq(NaN, NaN);
5010
- * // => true
5011
- */
5012
-
5013
- var eq_1;
5014
- var hasRequiredEq;
5015
-
5016
- function requireEq () {
5017
- if (hasRequiredEq) return eq_1;
5018
- hasRequiredEq = 1;
5019
- function eq(value, other) {
5020
- return value === other || (value !== value && other !== other);
5021
- }
5022
-
5023
- eq_1 = eq;
5024
- return eq_1;
5025
- }
5026
-
5027
- /** Used as references for various `Number` constants. */
5028
-
5029
- var isLength_1;
5030
- var hasRequiredIsLength;
5031
-
5032
- function requireIsLength () {
5033
- if (hasRequiredIsLength) return isLength_1;
5034
- hasRequiredIsLength = 1;
5035
- var MAX_SAFE_INTEGER = 9007199254740991;
5036
-
5037
- /**
5038
- * Checks if `value` is a valid array-like length.
5039
- *
5040
- * **Note:** This method is loosely based on
5041
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
5042
- *
5043
- * @static
5044
- * @memberOf _
5045
- * @since 4.0.0
5046
- * @category Lang
5047
- * @param {*} value The value to check.
5048
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
5049
- * @example
5050
- *
5051
- * _.isLength(3);
5052
- * // => true
5053
- *
5054
- * _.isLength(Number.MIN_VALUE);
5055
- * // => false
5056
- *
5057
- * _.isLength(Infinity);
5058
- * // => false
5059
- *
5060
- * _.isLength('3');
5061
- * // => false
5062
- */
5063
- function isLength(value) {
5064
- return typeof value == 'number' &&
5065
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
5066
- }
5067
-
5068
- isLength_1 = isLength;
5069
- return isLength_1;
5070
- }
5071
-
5072
- var isArrayLike_1;
5073
- var hasRequiredIsArrayLike;
5074
-
5075
- function requireIsArrayLike () {
5076
- if (hasRequiredIsArrayLike) return isArrayLike_1;
5077
- hasRequiredIsArrayLike = 1;
5078
- var isFunction = requireIsFunction(),
5079
- isLength = requireIsLength();
5080
-
5081
- /**
5082
- * Checks if `value` is array-like. A value is considered array-like if it's
5083
- * not a function and has a `value.length` that's an integer greater than or
5084
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
5085
- *
5086
- * @static
5087
- * @memberOf _
5088
- * @since 4.0.0
5089
- * @category Lang
5090
- * @param {*} value The value to check.
5091
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
5092
- * @example
5093
- *
5094
- * _.isArrayLike([1, 2, 3]);
5095
- * // => true
5096
- *
5097
- * _.isArrayLike(document.body.children);
5098
- * // => true
5099
- *
5100
- * _.isArrayLike('abc');
5101
- * // => true
5102
- *
5103
- * _.isArrayLike(_.noop);
5104
- * // => false
5105
- */
5106
- function isArrayLike(value) {
5107
- return value != null && isLength(value.length) && !isFunction(value);
5108
- }
5109
-
5110
- isArrayLike_1 = isArrayLike;
5111
- return isArrayLike_1;
5112
- }
5113
-
5114
- /** Used as references for various `Number` constants. */
5115
-
5116
- var _isIndex;
5117
- var hasRequired_isIndex;
5118
-
5119
- function require_isIndex () {
5120
- if (hasRequired_isIndex) return _isIndex;
5121
- hasRequired_isIndex = 1;
5122
- var MAX_SAFE_INTEGER = 9007199254740991;
5123
-
5124
- /** Used to detect unsigned integer values. */
5125
- var reIsUint = /^(?:0|[1-9]\d*)$/;
5126
-
5127
- /**
5128
- * Checks if `value` is a valid array-like index.
5129
- *
5130
- * @private
5131
- * @param {*} value The value to check.
5132
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
5133
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
5134
- */
5135
- function isIndex(value, length) {
5136
- var type = typeof value;
5137
- length = length == null ? MAX_SAFE_INTEGER : length;
5138
-
5139
- return !!length &&
5140
- (type == 'number' ||
5141
- (type != 'symbol' && reIsUint.test(value))) &&
5142
- (value > -1 && value % 1 == 0 && value < length);
5143
- }
5144
-
5145
- _isIndex = isIndex;
5146
- return _isIndex;
5147
- }
5148
-
5149
- var _isIterateeCall;
5150
- var hasRequired_isIterateeCall;
5151
-
5152
- function require_isIterateeCall () {
5153
- if (hasRequired_isIterateeCall) return _isIterateeCall;
5154
- hasRequired_isIterateeCall = 1;
5155
- var eq = requireEq(),
5156
- isArrayLike = requireIsArrayLike(),
5157
- isIndex = require_isIndex(),
5158
- isObject = requireIsObject();
5159
-
5160
- /**
5161
- * Checks if the given arguments are from an iteratee call.
5162
- *
5163
- * @private
5164
- * @param {*} value The potential iteratee value argument.
5165
- * @param {*} index The potential iteratee index or key argument.
5166
- * @param {*} object The potential iteratee object argument.
5167
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
5168
- * else `false`.
5169
- */
5170
- function isIterateeCall(value, index, object) {
5171
- if (!isObject(object)) {
5172
- return false;
5173
- }
5174
- var type = typeof index;
5175
- if (type == 'number'
5176
- ? (isArrayLike(object) && isIndex(index, object.length))
5177
- : (type == 'string' && index in object)
5178
- ) {
5179
- return eq(object[index], value);
5180
- }
5181
- return false;
5182
- }
5183
-
5184
- _isIterateeCall = isIterateeCall;
5185
- return _isIterateeCall;
5186
- }
5187
-
5188
- /**
5189
- * The base implementation of `_.times` without support for iteratee shorthands
5190
- * or max array length checks.
5191
- *
5192
- * @private
5193
- * @param {number} n The number of times to invoke `iteratee`.
5194
- * @param {Function} iteratee The function invoked per iteration.
5195
- * @returns {Array} Returns the array of results.
5196
- */
5197
-
5198
- var _baseTimes;
5199
- var hasRequired_baseTimes;
5200
-
5201
- function require_baseTimes () {
5202
- if (hasRequired_baseTimes) return _baseTimes;
5203
- hasRequired_baseTimes = 1;
5204
- function baseTimes(n, iteratee) {
5205
- var index = -1,
5206
- result = Array(n);
5207
-
5208
- while (++index < n) {
5209
- result[index] = iteratee(index);
5210
- }
5211
- return result;
5212
- }
5213
-
5214
- _baseTimes = baseTimes;
5215
- return _baseTimes;
5216
- }
5217
-
5218
- /**
5219
- * Checks if `value` is object-like. A value is object-like if it's not `null`
5220
- * and has a `typeof` result of "object".
5221
- *
5222
- * @static
5223
- * @memberOf _
5224
- * @since 4.0.0
5225
- * @category Lang
5226
- * @param {*} value The value to check.
5227
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
5228
- * @example
5229
- *
5230
- * _.isObjectLike({});
5231
- * // => true
5232
- *
5233
- * _.isObjectLike([1, 2, 3]);
5234
- * // => true
5235
- *
5236
- * _.isObjectLike(_.noop);
5237
- * // => false
5238
- *
5239
- * _.isObjectLike(null);
5240
- * // => false
5241
- */
5242
-
5243
- var isObjectLike_1;
5244
- var hasRequiredIsObjectLike;
5245
-
5246
- function requireIsObjectLike () {
5247
- if (hasRequiredIsObjectLike) return isObjectLike_1;
5248
- hasRequiredIsObjectLike = 1;
5249
- function isObjectLike(value) {
5250
- return value != null && typeof value == 'object';
5251
- }
5252
-
5253
- isObjectLike_1 = isObjectLike;
5254
- return isObjectLike_1;
5255
- }
5256
-
5257
- var _baseIsArguments;
5258
- var hasRequired_baseIsArguments;
5259
-
5260
- function require_baseIsArguments () {
5261
- if (hasRequired_baseIsArguments) return _baseIsArguments;
5262
- hasRequired_baseIsArguments = 1;
5263
- var baseGetTag = require_baseGetTag(),
5264
- isObjectLike = requireIsObjectLike();
5265
-
5266
- /** `Object#toString` result references. */
5267
- var argsTag = '[object Arguments]';
5268
-
5269
- /**
5270
- * The base implementation of `_.isArguments`.
5271
- *
5272
- * @private
5273
- * @param {*} value The value to check.
5274
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
5275
- */
5276
- function baseIsArguments(value) {
5277
- return isObjectLike(value) && baseGetTag(value) == argsTag;
5278
- }
5279
-
5280
- _baseIsArguments = baseIsArguments;
5281
- return _baseIsArguments;
5282
- }
5283
-
5284
- var isArguments_1;
5285
- var hasRequiredIsArguments;
5286
-
5287
- function requireIsArguments () {
5288
- if (hasRequiredIsArguments) return isArguments_1;
5289
- hasRequiredIsArguments = 1;
5290
- var baseIsArguments = require_baseIsArguments(),
5291
- isObjectLike = requireIsObjectLike();
5292
-
5293
- /** Used for built-in method references. */
5294
- var objectProto = Object.prototype;
5295
-
5296
- /** Used to check objects for own properties. */
5297
- var hasOwnProperty = objectProto.hasOwnProperty;
5298
-
5299
- /** Built-in value references. */
5300
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
5301
-
5302
- /**
5303
- * Checks if `value` is likely an `arguments` object.
5304
- *
5305
- * @static
5306
- * @memberOf _
5307
- * @since 0.1.0
5308
- * @category Lang
5309
- * @param {*} value The value to check.
5310
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
5311
- * else `false`.
5312
- * @example
5313
- *
5314
- * _.isArguments(function() { return arguments; }());
5315
- * // => true
5316
- *
5317
- * _.isArguments([1, 2, 3]);
5318
- * // => false
5319
- */
5320
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
5321
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
5322
- !propertyIsEnumerable.call(value, 'callee');
5323
- };
5324
-
5325
- isArguments_1 = isArguments;
5326
- return isArguments_1;
5327
- }
5328
-
5329
- /**
5330
- * Checks if `value` is classified as an `Array` object.
5331
- *
5332
- * @static
5333
- * @memberOf _
5334
- * @since 0.1.0
5335
- * @category Lang
5336
- * @param {*} value The value to check.
5337
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
5338
- * @example
5339
- *
5340
- * _.isArray([1, 2, 3]);
5341
- * // => true
5342
- *
5343
- * _.isArray(document.body.children);
5344
- * // => false
5345
- *
5346
- * _.isArray('abc');
5347
- * // => false
5348
- *
5349
- * _.isArray(_.noop);
5350
- * // => false
5351
- */
5352
-
5353
- var isArray_1;
5354
- var hasRequiredIsArray;
5355
-
5356
- function requireIsArray () {
5357
- if (hasRequiredIsArray) return isArray_1;
5358
- hasRequiredIsArray = 1;
5359
- var isArray = Array.isArray;
5360
-
5361
- isArray_1 = isArray;
5362
- return isArray_1;
5363
- }
5364
-
5365
- var isBuffer = {exports: {}};
5366
-
5367
- /**
5368
- * This method returns `false`.
5369
- *
5370
- * @static
5371
- * @memberOf _
5372
- * @since 4.13.0
5373
- * @category Util
5374
- * @returns {boolean} Returns `false`.
5375
- * @example
5376
- *
5377
- * _.times(2, _.stubFalse);
5378
- * // => [false, false]
5379
- */
5380
-
5381
- var stubFalse_1;
5382
- var hasRequiredStubFalse;
5383
-
5384
- function requireStubFalse () {
5385
- if (hasRequiredStubFalse) return stubFalse_1;
5386
- hasRequiredStubFalse = 1;
5387
- function stubFalse() {
5388
- return false;
5389
- }
5390
-
5391
- stubFalse_1 = stubFalse;
5392
- return stubFalse_1;
5393
- }
5394
-
5395
- isBuffer.exports;
5396
-
5397
- var hasRequiredIsBuffer;
5398
-
5399
- function requireIsBuffer () {
5400
- if (hasRequiredIsBuffer) return isBuffer.exports;
5401
- hasRequiredIsBuffer = 1;
5402
- (function (module, exports$1) {
5403
- var root = require_root(),
5404
- stubFalse = requireStubFalse();
5405
-
5406
- /** Detect free variable `exports`. */
5407
- var freeExports = exports$1 && !exports$1.nodeType && exports$1;
5408
-
5409
- /** Detect free variable `module`. */
5410
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
5411
-
5412
- /** Detect the popular CommonJS extension `module.exports`. */
5413
- var moduleExports = freeModule && freeModule.exports === freeExports;
5414
-
5415
- /** Built-in value references. */
5416
- var Buffer = moduleExports ? root.Buffer : undefined;
5417
-
5418
- /* Built-in method references for those with the same name as other `lodash` methods. */
5419
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
5420
-
5421
- /**
5422
- * Checks if `value` is a buffer.
5423
- *
5424
- * @static
5425
- * @memberOf _
5426
- * @since 4.3.0
5427
- * @category Lang
5428
- * @param {*} value The value to check.
5429
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
5430
- * @example
5431
- *
5432
- * _.isBuffer(new Buffer(2));
5433
- * // => true
5434
- *
5435
- * _.isBuffer(new Uint8Array(2));
5436
- * // => false
5437
- */
5438
- var isBuffer = nativeIsBuffer || stubFalse;
5439
-
5440
- module.exports = isBuffer;
5441
- } (isBuffer, isBuffer.exports));
5442
- return isBuffer.exports;
5443
- }
5444
-
5445
- var _baseIsTypedArray;
5446
- var hasRequired_baseIsTypedArray;
5447
-
5448
- function require_baseIsTypedArray () {
5449
- if (hasRequired_baseIsTypedArray) return _baseIsTypedArray;
5450
- hasRequired_baseIsTypedArray = 1;
5451
- var baseGetTag = require_baseGetTag(),
5452
- isLength = requireIsLength(),
5453
- isObjectLike = requireIsObjectLike();
5454
-
5455
- /** `Object#toString` result references. */
5456
- var argsTag = '[object Arguments]',
5457
- arrayTag = '[object Array]',
5458
- boolTag = '[object Boolean]',
5459
- dateTag = '[object Date]',
5460
- errorTag = '[object Error]',
5461
- funcTag = '[object Function]',
5462
- mapTag = '[object Map]',
5463
- numberTag = '[object Number]',
5464
- objectTag = '[object Object]',
5465
- regexpTag = '[object RegExp]',
5466
- setTag = '[object Set]',
5467
- stringTag = '[object String]',
5468
- weakMapTag = '[object WeakMap]';
5469
-
5470
- var arrayBufferTag = '[object ArrayBuffer]',
5471
- dataViewTag = '[object DataView]',
5472
- float32Tag = '[object Float32Array]',
5473
- float64Tag = '[object Float64Array]',
5474
- int8Tag = '[object Int8Array]',
5475
- int16Tag = '[object Int16Array]',
5476
- int32Tag = '[object Int32Array]',
5477
- uint8Tag = '[object Uint8Array]',
5478
- uint8ClampedTag = '[object Uint8ClampedArray]',
5479
- uint16Tag = '[object Uint16Array]',
5480
- uint32Tag = '[object Uint32Array]';
5481
-
5482
- /** Used to identify `toStringTag` values of typed arrays. */
5483
- var typedArrayTags = {};
5484
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
5485
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
5486
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
5487
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
5488
- typedArrayTags[uint32Tag] = true;
5489
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
5490
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
5491
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
5492
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
5493
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
5494
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
5495
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
5496
- typedArrayTags[weakMapTag] = false;
5497
-
5498
- /**
5499
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
5500
- *
5501
- * @private
5502
- * @param {*} value The value to check.
5503
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
5504
- */
5505
- function baseIsTypedArray(value) {
5506
- return isObjectLike(value) &&
5507
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
5508
- }
5509
-
5510
- _baseIsTypedArray = baseIsTypedArray;
5511
- return _baseIsTypedArray;
5512
- }
5513
-
5514
- /**
5515
- * The base implementation of `_.unary` without support for storing metadata.
5516
- *
5517
- * @private
5518
- * @param {Function} func The function to cap arguments for.
5519
- * @returns {Function} Returns the new capped function.
5520
- */
5521
-
5522
- var _baseUnary;
5523
- var hasRequired_baseUnary;
5524
-
5525
- function require_baseUnary () {
5526
- if (hasRequired_baseUnary) return _baseUnary;
5527
- hasRequired_baseUnary = 1;
5528
- function baseUnary(func) {
5529
- return function(value) {
5530
- return func(value);
5531
- };
5532
- }
5533
-
5534
- _baseUnary = baseUnary;
5535
- return _baseUnary;
5536
- }
5537
-
5538
- var _nodeUtil = {exports: {}};
5539
-
5540
- _nodeUtil.exports;
5541
-
5542
- var hasRequired_nodeUtil;
5543
-
5544
- function require_nodeUtil () {
5545
- if (hasRequired_nodeUtil) return _nodeUtil.exports;
5546
- hasRequired_nodeUtil = 1;
5547
- (function (module, exports$1) {
5548
- var freeGlobal = require_freeGlobal();
5549
-
5550
- /** Detect free variable `exports`. */
5551
- var freeExports = exports$1 && !exports$1.nodeType && exports$1;
5552
-
5553
- /** Detect free variable `module`. */
5554
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
5555
-
5556
- /** Detect the popular CommonJS extension `module.exports`. */
5557
- var moduleExports = freeModule && freeModule.exports === freeExports;
5558
-
5559
- /** Detect free variable `process` from Node.js. */
5560
- var freeProcess = moduleExports && freeGlobal.process;
5561
-
5562
- /** Used to access faster Node.js helpers. */
5563
- var nodeUtil = (function() {
5564
- try {
5565
- // Use `util.types` for Node.js 10+.
5566
- var types = freeModule && freeModule.require && freeModule.require('util').types;
5567
-
5568
- if (types) {
5569
- return types;
5570
- }
5571
-
5572
- // Legacy `process.binding('util')` for Node.js < 10.
5573
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
5574
- } catch (e) {}
5575
- }());
5576
-
5577
- module.exports = nodeUtil;
5578
- } (_nodeUtil, _nodeUtil.exports));
5579
- return _nodeUtil.exports;
5580
- }
5581
-
5582
- var isTypedArray_1;
5583
- var hasRequiredIsTypedArray;
5584
-
5585
- function requireIsTypedArray () {
5586
- if (hasRequiredIsTypedArray) return isTypedArray_1;
5587
- hasRequiredIsTypedArray = 1;
5588
- var baseIsTypedArray = require_baseIsTypedArray(),
5589
- baseUnary = require_baseUnary(),
5590
- nodeUtil = require_nodeUtil();
5591
-
5592
- /* Node.js helper references. */
5593
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
5594
-
5595
- /**
5596
- * Checks if `value` is classified as a typed array.
5597
- *
5598
- * @static
5599
- * @memberOf _
5600
- * @since 3.0.0
5601
- * @category Lang
5602
- * @param {*} value The value to check.
5603
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
5604
- * @example
5605
- *
5606
- * _.isTypedArray(new Uint8Array);
5607
- * // => true
5608
- *
5609
- * _.isTypedArray([]);
5610
- * // => false
5611
- */
5612
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
5613
-
5614
- isTypedArray_1 = isTypedArray;
5615
- return isTypedArray_1;
5616
- }
5617
-
5618
- var _arrayLikeKeys;
5619
- var hasRequired_arrayLikeKeys;
5620
-
5621
- function require_arrayLikeKeys () {
5622
- if (hasRequired_arrayLikeKeys) return _arrayLikeKeys;
5623
- hasRequired_arrayLikeKeys = 1;
5624
- var baseTimes = require_baseTimes(),
5625
- isArguments = requireIsArguments(),
5626
- isArray = requireIsArray(),
5627
- isBuffer = requireIsBuffer(),
5628
- isIndex = require_isIndex(),
5629
- isTypedArray = requireIsTypedArray();
5630
-
5631
- /** Used for built-in method references. */
5632
- var objectProto = Object.prototype;
5633
-
5634
- /** Used to check objects for own properties. */
5635
- var hasOwnProperty = objectProto.hasOwnProperty;
5636
-
5637
- /**
5638
- * Creates an array of the enumerable property names of the array-like `value`.
5639
- *
5640
- * @private
5641
- * @param {*} value The value to query.
5642
- * @param {boolean} inherited Specify returning inherited property names.
5643
- * @returns {Array} Returns the array of property names.
5644
- */
5645
- function arrayLikeKeys(value, inherited) {
5646
- var isArr = isArray(value),
5647
- isArg = !isArr && isArguments(value),
5648
- isBuff = !isArr && !isArg && isBuffer(value),
5649
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
5650
- skipIndexes = isArr || isArg || isBuff || isType,
5651
- result = skipIndexes ? baseTimes(value.length, String) : [],
5652
- length = result.length;
5653
-
5654
- for (var key in value) {
5655
- if ((inherited || hasOwnProperty.call(value, key)) &&
5656
- !(skipIndexes && (
5657
- // Safari 9 has enumerable `arguments.length` in strict mode.
5658
- key == 'length' ||
5659
- // Node.js 0.10 has enumerable non-index properties on buffers.
5660
- (isBuff && (key == 'offset' || key == 'parent')) ||
5661
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
5662
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
5663
- // Skip index properties.
5664
- isIndex(key, length)
5665
- ))) {
5666
- result.push(key);
5667
- }
5668
- }
5669
- return result;
5670
- }
5671
-
5672
- _arrayLikeKeys = arrayLikeKeys;
5673
- return _arrayLikeKeys;
5674
- }
5675
-
5676
- /** Used for built-in method references. */
5677
-
5678
- var _isPrototype;
5679
- var hasRequired_isPrototype;
5680
-
5681
- function require_isPrototype () {
5682
- if (hasRequired_isPrototype) return _isPrototype;
5683
- hasRequired_isPrototype = 1;
5684
- var objectProto = Object.prototype;
5685
-
5686
- /**
5687
- * Checks if `value` is likely a prototype object.
5688
- *
5689
- * @private
5690
- * @param {*} value The value to check.
5691
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
5692
- */
5693
- function isPrototype(value) {
5694
- var Ctor = value && value.constructor,
5695
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
5696
-
5697
- return value === proto;
5698
- }
5699
-
5700
- _isPrototype = isPrototype;
5701
- return _isPrototype;
5702
- }
5703
-
5704
- /**
5705
- * This function is like
5706
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
5707
- * except that it includes inherited enumerable properties.
5708
- *
5709
- * @private
5710
- * @param {Object} object The object to query.
5711
- * @returns {Array} Returns the array of property names.
5712
- */
5713
-
5714
- var _nativeKeysIn;
5715
- var hasRequired_nativeKeysIn;
5716
-
5717
- function require_nativeKeysIn () {
5718
- if (hasRequired_nativeKeysIn) return _nativeKeysIn;
5719
- hasRequired_nativeKeysIn = 1;
5720
- function nativeKeysIn(object) {
5721
- var result = [];
5722
- if (object != null) {
5723
- for (var key in Object(object)) {
5724
- result.push(key);
5725
- }
5726
- }
5727
- return result;
5728
- }
5729
-
5730
- _nativeKeysIn = nativeKeysIn;
5731
- return _nativeKeysIn;
5732
- }
5733
-
5734
- var _baseKeysIn;
5735
- var hasRequired_baseKeysIn;
5736
-
5737
- function require_baseKeysIn () {
5738
- if (hasRequired_baseKeysIn) return _baseKeysIn;
5739
- hasRequired_baseKeysIn = 1;
5740
- var isObject = requireIsObject(),
5741
- isPrototype = require_isPrototype(),
5742
- nativeKeysIn = require_nativeKeysIn();
5743
-
5744
- /** Used for built-in method references. */
5745
- var objectProto = Object.prototype;
5746
-
5747
- /** Used to check objects for own properties. */
5748
- var hasOwnProperty = objectProto.hasOwnProperty;
5749
-
5750
- /**
5751
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
5752
- *
5753
- * @private
5754
- * @param {Object} object The object to query.
5755
- * @returns {Array} Returns the array of property names.
5756
- */
5757
- function baseKeysIn(object) {
5758
- if (!isObject(object)) {
5759
- return nativeKeysIn(object);
5760
- }
5761
- var isProto = isPrototype(object),
5762
- result = [];
5763
-
5764
- for (var key in object) {
5765
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
5766
- result.push(key);
5767
- }
5768
- }
5769
- return result;
5770
- }
5771
-
5772
- _baseKeysIn = baseKeysIn;
5773
- return _baseKeysIn;
5774
- }
5775
-
5776
- var keysIn_1;
5777
- var hasRequiredKeysIn;
5778
-
5779
- function requireKeysIn () {
5780
- if (hasRequiredKeysIn) return keysIn_1;
5781
- hasRequiredKeysIn = 1;
5782
- var arrayLikeKeys = require_arrayLikeKeys(),
5783
- baseKeysIn = require_baseKeysIn(),
5784
- isArrayLike = requireIsArrayLike();
5785
-
5786
- /**
5787
- * Creates an array of the own and inherited enumerable property names of `object`.
5788
- *
5789
- * **Note:** Non-object values are coerced to objects.
5790
- *
5791
- * @static
5792
- * @memberOf _
5793
- * @since 3.0.0
5794
- * @category Object
5795
- * @param {Object} object The object to query.
5796
- * @returns {Array} Returns the array of property names.
5797
- * @example
5798
- *
5799
- * function Foo() {
5800
- * this.a = 1;
5801
- * this.b = 2;
5802
- * }
5803
- *
5804
- * Foo.prototype.c = 3;
5805
- *
5806
- * _.keysIn(new Foo);
5807
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
5808
- */
5809
- function keysIn(object) {
5810
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
5811
- }
5812
-
5813
- keysIn_1 = keysIn;
5814
- return keysIn_1;
5815
- }
5816
-
5817
- var defaults_1;
5818
- var hasRequiredDefaults;
5819
-
5820
- function requireDefaults () {
5821
- if (hasRequiredDefaults) return defaults_1;
5822
- hasRequiredDefaults = 1;
5823
- var baseRest = require_baseRest(),
5824
- eq = requireEq(),
5825
- isIterateeCall = require_isIterateeCall(),
5826
- keysIn = requireKeysIn();
5827
-
5828
- /** Used for built-in method references. */
5829
- var objectProto = Object.prototype;
5830
-
5831
- /** Used to check objects for own properties. */
5832
- var hasOwnProperty = objectProto.hasOwnProperty;
5833
-
5834
- /**
5835
- * Assigns own and inherited enumerable string keyed properties of source
5836
- * objects to the destination object for all destination properties that
5837
- * resolve to `undefined`. Source objects are applied from left to right.
5838
- * Once a property is set, additional values of the same property are ignored.
5839
- *
5840
- * **Note:** This method mutates `object`.
5841
- *
5842
- * @static
5843
- * @since 0.1.0
5844
- * @memberOf _
5845
- * @category Object
5846
- * @param {Object} object The destination object.
5847
- * @param {...Object} [sources] The source objects.
5848
- * @returns {Object} Returns `object`.
5849
- * @see _.defaultsDeep
5850
- * @example
5851
- *
5852
- * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
5853
- * // => { 'a': 1, 'b': 2 }
5854
- */
5855
- var defaults = baseRest(function(object, sources) {
5856
- object = Object(object);
5857
-
5858
- var index = -1;
5859
- var length = sources.length;
5860
- var guard = length > 2 ? sources[2] : undefined;
5861
-
5862
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
5863
- length = 1;
5864
- }
5865
-
5866
- while (++index < length) {
5867
- var source = sources[index];
5868
- var props = keysIn(source);
5869
- var propsIndex = -1;
5870
- var propsLength = props.length;
5871
-
5872
- while (++propsIndex < propsLength) {
5873
- var key = props[propsIndex];
5874
- var value = object[key];
5875
-
5876
- if (value === undefined ||
5877
- (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
5878
- object[key] = source[key];
5879
- }
5880
- }
5881
- }
5882
-
5883
- return object;
5884
- });
5885
-
5886
- defaults_1 = defaults;
5887
- return defaults_1;
5888
- }
5889
-
5890
- var defaultsExports = requireDefaults();
5891
- var defaults = /*@__PURE__*/getDefaultExportFromCjs(defaultsExports);
5892
-
5893
4247
  class ChatService extends BaseService {
5894
4248
  async chat(msg, options, messageMode = 'user-message') {
5895
4249
  const chatOptions = {
5896
4250
  msg,
5897
- ...defaults(options, {
5898
- datasources: [],
5899
- }),
4251
+ ...(options || {}),
5900
4252
  };
4253
+ chatOptions.datasources || (chatOptions.datasources = []);
5901
4254
  chatOptions.tags || (chatOptions.tags = []);
5902
4255
  chatOptions.tags.push('one-js-sdk');
5903
4256
  const response = await this.sendPost('/v1/chat', chatOptions).then((res) => res.json());
@@ -5918,9 +4271,9 @@ class ChatService extends BaseService {
5918
4271
  const formData = new FormData();
5919
4272
  formData.append('file', file, fileName);
5920
4273
  formData.append('msg', msg);
5921
- const params = new URLSearchParams(libExports.stringify(defaults(options, { datasources: [] }), {
5922
- allowEmptyArrays: true,
5923
- }));
4274
+ options || (options = {});
4275
+ options.datasources || (options.datasources = []);
4276
+ const params = new URLSearchParams(libExports.stringify(options, { allowEmptyArrays: true }));
5924
4277
  for (const [key, value] of params.entries()) {
5925
4278
  formData.append(key, value);
5926
4279
  }