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