@bigbinary/neeto-commons-frontend 3.0.0 → 3.0.2

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/utils.cjs.js CHANGED
@@ -7,7 +7,7 @@ var ramda = require('ramda');
7
7
  var i18next = require('i18next');
8
8
  var neetoCist = require('@bigbinary/neeto-cist');
9
9
  var neetoui = require('@bigbinary/neetoui');
10
- var require$$0 = require('util');
10
+ var qs = require('qs');
11
11
  var dayjs = require('dayjs');
12
12
  var relativeTime = require('dayjs/plugin/relativeTime');
13
13
  var updateLocale = require('dayjs/plugin/updateLocale');
@@ -16,7 +16,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
16
16
 
17
17
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
18
18
  var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
19
- var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
20
19
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
21
20
  var relativeTime__default = /*#__PURE__*/_interopDefaultLegacy(relativeTime);
22
21
  var updateLocale__default = /*#__PURE__*/_interopDefaultLegacy(updateLocale);
@@ -499,2038 +498,6 @@ try {
499
498
  }
500
499
  }
501
500
 
502
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
503
- var shams = function hasSymbols() {
504
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
505
- if (typeof Symbol.iterator === 'symbol') { return true; }
506
-
507
- var obj = {};
508
- var sym = Symbol('test');
509
- var symObj = Object(sym);
510
- if (typeof sym === 'string') { return false; }
511
-
512
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
513
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
514
-
515
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
516
- // if (sym instanceof Symbol) { return false; }
517
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
518
- // if (!(symObj instanceof Symbol)) { return false; }
519
-
520
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
521
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
522
-
523
- var symVal = 42;
524
- obj[sym] = symVal;
525
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
526
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
527
-
528
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
529
-
530
- var syms = Object.getOwnPropertySymbols(obj);
531
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
532
-
533
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
534
-
535
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
536
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
537
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
538
- }
539
-
540
- return true;
541
- };
542
-
543
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
544
- var hasSymbolSham = shams;
545
-
546
- var hasSymbols$1 = function hasNativeSymbols() {
547
- if (typeof origSymbol !== 'function') { return false; }
548
- if (typeof Symbol !== 'function') { return false; }
549
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
550
- if (typeof Symbol('bar') !== 'symbol') { return false; }
551
-
552
- return hasSymbolSham();
553
- };
554
-
555
- /* eslint no-invalid-this: 1 */
556
-
557
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
558
- var slice = Array.prototype.slice;
559
- var toStr$1 = Object.prototype.toString;
560
- var funcType = '[object Function]';
561
-
562
- var implementation$1 = function bind(that) {
563
- var target = this;
564
- if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
565
- throw new TypeError(ERROR_MESSAGE + target);
566
- }
567
- var args = slice.call(arguments, 1);
568
-
569
- var bound;
570
- var binder = function () {
571
- if (this instanceof bound) {
572
- var result = target.apply(
573
- this,
574
- args.concat(slice.call(arguments))
575
- );
576
- if (Object(result) === result) {
577
- return result;
578
- }
579
- return this;
580
- } else {
581
- return target.apply(
582
- that,
583
- args.concat(slice.call(arguments))
584
- );
585
- }
586
- };
587
-
588
- var boundLength = Math.max(0, target.length - args.length);
589
- var boundArgs = [];
590
- for (var i = 0; i < boundLength; i++) {
591
- boundArgs.push('$' + i);
592
- }
593
-
594
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
595
-
596
- if (target.prototype) {
597
- var Empty = function Empty() {};
598
- Empty.prototype = target.prototype;
599
- bound.prototype = new Empty();
600
- Empty.prototype = null;
601
- }
602
-
603
- return bound;
604
- };
605
-
606
- var implementation = implementation$1;
607
-
608
- var functionBind = Function.prototype.bind || implementation;
609
-
610
- var bind$1 = functionBind;
611
-
612
- var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
613
-
614
- var undefined$1;
615
-
616
- var $SyntaxError = SyntaxError;
617
- var $Function = Function;
618
- var $TypeError$1 = TypeError;
619
-
620
- // eslint-disable-next-line consistent-return
621
- var getEvalledConstructor = function (expressionSyntax) {
622
- try {
623
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
624
- } catch (e) {}
625
- };
626
-
627
- var $gOPD = Object.getOwnPropertyDescriptor;
628
- if ($gOPD) {
629
- try {
630
- $gOPD({}, '');
631
- } catch (e) {
632
- $gOPD = null; // this is IE 8, which has a broken gOPD
633
- }
634
- }
635
-
636
- var throwTypeError = function () {
637
- throw new $TypeError$1();
638
- };
639
- var ThrowTypeError = $gOPD
640
- ? (function () {
641
- try {
642
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
643
- arguments.callee; // IE 8 does not throw here
644
- return throwTypeError;
645
- } catch (calleeThrows) {
646
- try {
647
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
648
- return $gOPD(arguments, 'callee').get;
649
- } catch (gOPDthrows) {
650
- return throwTypeError;
651
- }
652
- }
653
- }())
654
- : throwTypeError;
655
-
656
- var hasSymbols = hasSymbols$1();
657
-
658
- var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
659
-
660
- var needsEval = {};
661
-
662
- var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
663
-
664
- var INTRINSICS = {
665
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
666
- '%Array%': Array,
667
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
668
- '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
669
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
670
- '%AsyncFunction%': needsEval,
671
- '%AsyncGenerator%': needsEval,
672
- '%AsyncGeneratorFunction%': needsEval,
673
- '%AsyncIteratorPrototype%': needsEval,
674
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
675
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
676
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
677
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
678
- '%Boolean%': Boolean,
679
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
680
- '%Date%': Date,
681
- '%decodeURI%': decodeURI,
682
- '%decodeURIComponent%': decodeURIComponent,
683
- '%encodeURI%': encodeURI,
684
- '%encodeURIComponent%': encodeURIComponent,
685
- '%Error%': Error,
686
- '%eval%': eval, // eslint-disable-line no-eval
687
- '%EvalError%': EvalError,
688
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
689
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
690
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
691
- '%Function%': $Function,
692
- '%GeneratorFunction%': needsEval,
693
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
694
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
695
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
696
- '%isFinite%': isFinite,
697
- '%isNaN%': isNaN,
698
- '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
699
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
700
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
701
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
702
- '%Math%': Math,
703
- '%Number%': Number,
704
- '%Object%': Object,
705
- '%parseFloat%': parseFloat,
706
- '%parseInt%': parseInt,
707
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
708
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
709
- '%RangeError%': RangeError,
710
- '%ReferenceError%': ReferenceError,
711
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
712
- '%RegExp%': RegExp,
713
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
714
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
715
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
716
- '%String%': String,
717
- '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
718
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
719
- '%SyntaxError%': $SyntaxError,
720
- '%ThrowTypeError%': ThrowTypeError,
721
- '%TypedArray%': TypedArray,
722
- '%TypeError%': $TypeError$1,
723
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
724
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
725
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
726
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
727
- '%URIError%': URIError,
728
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
729
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
730
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
731
- };
732
-
733
- try {
734
- null.error; // eslint-disable-line no-unused-expressions
735
- } catch (e) {
736
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
737
- var errorProto = getProto(getProto(e));
738
- INTRINSICS['%Error.prototype%'] = errorProto;
739
- }
740
-
741
- var doEval = function doEval(name) {
742
- var value;
743
- if (name === '%AsyncFunction%') {
744
- value = getEvalledConstructor('async function () {}');
745
- } else if (name === '%GeneratorFunction%') {
746
- value = getEvalledConstructor('function* () {}');
747
- } else if (name === '%AsyncGeneratorFunction%') {
748
- value = getEvalledConstructor('async function* () {}');
749
- } else if (name === '%AsyncGenerator%') {
750
- var fn = doEval('%AsyncGeneratorFunction%');
751
- if (fn) {
752
- value = fn.prototype;
753
- }
754
- } else if (name === '%AsyncIteratorPrototype%') {
755
- var gen = doEval('%AsyncGenerator%');
756
- if (gen) {
757
- value = getProto(gen.prototype);
758
- }
759
- }
760
-
761
- INTRINSICS[name] = value;
762
-
763
- return value;
764
- };
765
-
766
- var LEGACY_ALIASES = {
767
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
768
- '%ArrayPrototype%': ['Array', 'prototype'],
769
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
770
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
771
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
772
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
773
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
774
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
775
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
776
- '%BooleanPrototype%': ['Boolean', 'prototype'],
777
- '%DataViewPrototype%': ['DataView', 'prototype'],
778
- '%DatePrototype%': ['Date', 'prototype'],
779
- '%ErrorPrototype%': ['Error', 'prototype'],
780
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
781
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
782
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
783
- '%FunctionPrototype%': ['Function', 'prototype'],
784
- '%Generator%': ['GeneratorFunction', 'prototype'],
785
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
786
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
787
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
788
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
789
- '%JSONParse%': ['JSON', 'parse'],
790
- '%JSONStringify%': ['JSON', 'stringify'],
791
- '%MapPrototype%': ['Map', 'prototype'],
792
- '%NumberPrototype%': ['Number', 'prototype'],
793
- '%ObjectPrototype%': ['Object', 'prototype'],
794
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
795
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
796
- '%PromisePrototype%': ['Promise', 'prototype'],
797
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
798
- '%Promise_all%': ['Promise', 'all'],
799
- '%Promise_reject%': ['Promise', 'reject'],
800
- '%Promise_resolve%': ['Promise', 'resolve'],
801
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
802
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
803
- '%RegExpPrototype%': ['RegExp', 'prototype'],
804
- '%SetPrototype%': ['Set', 'prototype'],
805
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
806
- '%StringPrototype%': ['String', 'prototype'],
807
- '%SymbolPrototype%': ['Symbol', 'prototype'],
808
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
809
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
810
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
811
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
812
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
813
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
814
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
815
- '%URIErrorPrototype%': ['URIError', 'prototype'],
816
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
817
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
818
- };
819
-
820
- var bind = functionBind;
821
- var hasOwn$1 = src;
822
- var $concat$1 = bind.call(Function.call, Array.prototype.concat);
823
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
824
- var $replace$1 = bind.call(Function.call, String.prototype.replace);
825
- var $strSlice = bind.call(Function.call, String.prototype.slice);
826
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
827
-
828
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
829
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
830
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
831
- var stringToPath = function stringToPath(string) {
832
- var first = $strSlice(string, 0, 1);
833
- var last = $strSlice(string, -1);
834
- if (first === '%' && last !== '%') {
835
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
836
- } else if (last === '%' && first !== '%') {
837
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
838
- }
839
- var result = [];
840
- $replace$1(string, rePropName, function (match, number, quote, subString) {
841
- result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
842
- });
843
- return result;
844
- };
845
- /* end adaptation */
846
-
847
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
848
- var intrinsicName = name;
849
- var alias;
850
- if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
851
- alias = LEGACY_ALIASES[intrinsicName];
852
- intrinsicName = '%' + alias[0] + '%';
853
- }
854
-
855
- if (hasOwn$1(INTRINSICS, intrinsicName)) {
856
- var value = INTRINSICS[intrinsicName];
857
- if (value === needsEval) {
858
- value = doEval(intrinsicName);
859
- }
860
- if (typeof value === 'undefined' && !allowMissing) {
861
- throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
862
- }
863
-
864
- return {
865
- alias: alias,
866
- name: intrinsicName,
867
- value: value
868
- };
869
- }
870
-
871
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
872
- };
873
-
874
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
875
- if (typeof name !== 'string' || name.length === 0) {
876
- throw new $TypeError$1('intrinsic name must be a non-empty string');
877
- }
878
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
879
- throw new $TypeError$1('"allowMissing" argument must be a boolean');
880
- }
881
-
882
- if ($exec(/^%?[^%]*%?$/, name) === null) {
883
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
884
- }
885
- var parts = stringToPath(name);
886
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
887
-
888
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
889
- var intrinsicRealName = intrinsic.name;
890
- var value = intrinsic.value;
891
- var skipFurtherCaching = false;
892
-
893
- var alias = intrinsic.alias;
894
- if (alias) {
895
- intrinsicBaseName = alias[0];
896
- $spliceApply(parts, $concat$1([0, 1], alias));
897
- }
898
-
899
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
900
- var part = parts[i];
901
- var first = $strSlice(part, 0, 1);
902
- var last = $strSlice(part, -1);
903
- if (
904
- (
905
- (first === '"' || first === "'" || first === '`')
906
- || (last === '"' || last === "'" || last === '`')
907
- )
908
- && first !== last
909
- ) {
910
- throw new $SyntaxError('property names with quotes must have matching quotes');
911
- }
912
- if (part === 'constructor' || !isOwn) {
913
- skipFurtherCaching = true;
914
- }
915
-
916
- intrinsicBaseName += '.' + part;
917
- intrinsicRealName = '%' + intrinsicBaseName + '%';
918
-
919
- if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
920
- value = INTRINSICS[intrinsicRealName];
921
- } else if (value != null) {
922
- if (!(part in value)) {
923
- if (!allowMissing) {
924
- throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
925
- }
926
- return void undefined$1;
927
- }
928
- if ($gOPD && (i + 1) >= parts.length) {
929
- var desc = $gOPD(value, part);
930
- isOwn = !!desc;
931
-
932
- // By convention, when a data property is converted to an accessor
933
- // property to emulate a data property that does not suffer from
934
- // the override mistake, that accessor's getter is marked with
935
- // an `originalValue` property. Here, when we detect this, we
936
- // uphold the illusion by pretending to see that original data
937
- // property, i.e., returning the value rather than the getter
938
- // itself.
939
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
940
- value = desc.get;
941
- } else {
942
- value = value[part];
943
- }
944
- } else {
945
- isOwn = hasOwn$1(value, part);
946
- value = value[part];
947
- }
948
-
949
- if (isOwn && !skipFurtherCaching) {
950
- INTRINSICS[intrinsicRealName] = value;
951
- }
952
- }
953
- }
954
- return value;
955
- };
956
-
957
- var callBind$1 = {exports: {}};
958
-
959
- (function (module) {
960
-
961
- var bind = functionBind;
962
- var GetIntrinsic = getIntrinsic;
963
-
964
- var $apply = GetIntrinsic('%Function.prototype.apply%');
965
- var $call = GetIntrinsic('%Function.prototype.call%');
966
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
967
-
968
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
969
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
970
- var $max = GetIntrinsic('%Math.max%');
971
-
972
- if ($defineProperty) {
973
- try {
974
- $defineProperty({}, 'a', { value: 1 });
975
- } catch (e) {
976
- // IE 8 has a broken defineProperty
977
- $defineProperty = null;
978
- }
979
- }
980
-
981
- module.exports = function callBind(originalFunction) {
982
- var func = $reflectApply(bind, $call, arguments);
983
- if ($gOPD && $defineProperty) {
984
- var desc = $gOPD(func, 'length');
985
- if (desc.configurable) {
986
- // original length, plus the receiver, minus any additional arguments (after the receiver)
987
- $defineProperty(
988
- func,
989
- 'length',
990
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
991
- );
992
- }
993
- }
994
- return func;
995
- };
996
-
997
- var applyBind = function applyBind() {
998
- return $reflectApply(bind, $apply, arguments);
999
- };
1000
-
1001
- if ($defineProperty) {
1002
- $defineProperty(module.exports, 'apply', { value: applyBind });
1003
- } else {
1004
- module.exports.apply = applyBind;
1005
- }
1006
- } (callBind$1));
1007
-
1008
- var GetIntrinsic$1 = getIntrinsic;
1009
-
1010
- var callBind = callBind$1.exports;
1011
-
1012
- var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
1013
-
1014
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
1015
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
1016
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
1017
- return callBind(intrinsic);
1018
- }
1019
- return intrinsic;
1020
- };
1021
-
1022
- var util_inspect = require$$0__default["default"].inspect;
1023
-
1024
- var hasMap = typeof Map === 'function' && Map.prototype;
1025
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
1026
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
1027
- var mapForEach = hasMap && Map.prototype.forEach;
1028
- var hasSet = typeof Set === 'function' && Set.prototype;
1029
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
1030
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
1031
- var setForEach = hasSet && Set.prototype.forEach;
1032
- var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
1033
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
1034
- var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
1035
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
1036
- var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
1037
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
1038
- var booleanValueOf = Boolean.prototype.valueOf;
1039
- var objectToString = Object.prototype.toString;
1040
- var functionToString = Function.prototype.toString;
1041
- var $match = String.prototype.match;
1042
- var $slice = String.prototype.slice;
1043
- var $replace = String.prototype.replace;
1044
- var $toUpperCase = String.prototype.toUpperCase;
1045
- var $toLowerCase = String.prototype.toLowerCase;
1046
- var $test = RegExp.prototype.test;
1047
- var $concat = Array.prototype.concat;
1048
- var $join = Array.prototype.join;
1049
- var $arrSlice = Array.prototype.slice;
1050
- var $floor = Math.floor;
1051
- var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
1052
- var gOPS = Object.getOwnPropertySymbols;
1053
- var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
1054
- var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
1055
- // ie, `has-tostringtag/shams
1056
- var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
1057
- ? Symbol.toStringTag
1058
- : null;
1059
- var isEnumerable = Object.prototype.propertyIsEnumerable;
1060
-
1061
- var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
1062
- [].__proto__ === Array.prototype // eslint-disable-line no-proto
1063
- ? function (O) {
1064
- return O.__proto__; // eslint-disable-line no-proto
1065
- }
1066
- : null
1067
- );
1068
-
1069
- function addNumericSeparator(num, str) {
1070
- if (
1071
- num === Infinity
1072
- || num === -Infinity
1073
- || num !== num
1074
- || (num && num > -1000 && num < 1000)
1075
- || $test.call(/e/, str)
1076
- ) {
1077
- return str;
1078
- }
1079
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1080
- if (typeof num === 'number') {
1081
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
1082
- if (int !== num) {
1083
- var intStr = String(int);
1084
- var dec = $slice.call(str, intStr.length + 1);
1085
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
1086
- }
1087
- }
1088
- return $replace.call(str, sepRegex, '$&_');
1089
- }
1090
-
1091
- var utilInspect = util_inspect;
1092
- var inspectCustom = utilInspect.custom;
1093
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
1094
-
1095
- var objectInspect = function inspect_(obj, options, depth, seen) {
1096
- var opts = options || {};
1097
-
1098
- if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
1099
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
1100
- }
1101
- if (
1102
- has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
1103
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
1104
- : opts.maxStringLength !== null
1105
- )
1106
- ) {
1107
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1108
- }
1109
- var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
1110
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
1111
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
1112
- }
1113
-
1114
- if (
1115
- has$3(opts, 'indent')
1116
- && opts.indent !== null
1117
- && opts.indent !== '\t'
1118
- && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
1119
- ) {
1120
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1121
- }
1122
- if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
1123
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1124
- }
1125
- var numericSeparator = opts.numericSeparator;
1126
-
1127
- if (typeof obj === 'undefined') {
1128
- return 'undefined';
1129
- }
1130
- if (obj === null) {
1131
- return 'null';
1132
- }
1133
- if (typeof obj === 'boolean') {
1134
- return obj ? 'true' : 'false';
1135
- }
1136
-
1137
- if (typeof obj === 'string') {
1138
- return inspectString(obj, opts);
1139
- }
1140
- if (typeof obj === 'number') {
1141
- if (obj === 0) {
1142
- return Infinity / obj > 0 ? '0' : '-0';
1143
- }
1144
- var str = String(obj);
1145
- return numericSeparator ? addNumericSeparator(obj, str) : str;
1146
- }
1147
- if (typeof obj === 'bigint') {
1148
- var bigIntStr = String(obj) + 'n';
1149
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1150
- }
1151
-
1152
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
1153
- if (typeof depth === 'undefined') { depth = 0; }
1154
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
1155
- return isArray$3(obj) ? '[Array]' : '[Object]';
1156
- }
1157
-
1158
- var indent = getIndent(opts, depth);
1159
-
1160
- if (typeof seen === 'undefined') {
1161
- seen = [];
1162
- } else if (indexOf$1(seen, obj) >= 0) {
1163
- return '[Circular]';
1164
- }
1165
-
1166
- function inspect(value, from, noIndent) {
1167
- if (from) {
1168
- seen = $arrSlice.call(seen);
1169
- seen.push(from);
1170
- }
1171
- if (noIndent) {
1172
- var newOpts = {
1173
- depth: opts.depth
1174
- };
1175
- if (has$3(opts, 'quoteStyle')) {
1176
- newOpts.quoteStyle = opts.quoteStyle;
1177
- }
1178
- return inspect_(value, newOpts, depth + 1, seen);
1179
- }
1180
- return inspect_(value, opts, depth + 1, seen);
1181
- }
1182
-
1183
- if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
1184
- var name = nameOf(obj);
1185
- var keys = arrObjKeys(obj, inspect);
1186
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
1187
- }
1188
- if (isSymbol(obj)) {
1189
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
1190
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
1191
- }
1192
- if (isElement(obj)) {
1193
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
1194
- var attrs = obj.attributes || [];
1195
- for (var i = 0; i < attrs.length; i++) {
1196
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
1197
- }
1198
- s += '>';
1199
- if (obj.childNodes && obj.childNodes.length) { s += '...'; }
1200
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
1201
- return s;
1202
- }
1203
- if (isArray$3(obj)) {
1204
- if (obj.length === 0) { return '[]'; }
1205
- var xs = arrObjKeys(obj, inspect);
1206
- if (indent && !singleLineValues(xs)) {
1207
- return '[' + indentedJoin(xs, indent) + ']';
1208
- }
1209
- return '[ ' + $join.call(xs, ', ') + ' ]';
1210
- }
1211
- if (isError(obj)) {
1212
- var parts = arrObjKeys(obj, inspect);
1213
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
1214
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
1215
- }
1216
- if (parts.length === 0) { return '[' + String(obj) + ']'; }
1217
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
1218
- }
1219
- if (typeof obj === 'object' && customInspect) {
1220
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
1221
- return utilInspect(obj, { depth: maxDepth - depth });
1222
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
1223
- return obj.inspect();
1224
- }
1225
- }
1226
- if (isMap(obj)) {
1227
- var mapParts = [];
1228
- if (mapForEach) {
1229
- mapForEach.call(obj, function (value, key) {
1230
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1231
- });
1232
- }
1233
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1234
- }
1235
- if (isSet(obj)) {
1236
- var setParts = [];
1237
- if (setForEach) {
1238
- setForEach.call(obj, function (value) {
1239
- setParts.push(inspect(value, obj));
1240
- });
1241
- }
1242
- return collectionOf('Set', setSize.call(obj), setParts, indent);
1243
- }
1244
- if (isWeakMap(obj)) {
1245
- return weakCollectionOf('WeakMap');
1246
- }
1247
- if (isWeakSet(obj)) {
1248
- return weakCollectionOf('WeakSet');
1249
- }
1250
- if (isWeakRef(obj)) {
1251
- return weakCollectionOf('WeakRef');
1252
- }
1253
- if (isNumber(obj)) {
1254
- return markBoxed(inspect(Number(obj)));
1255
- }
1256
- if (isBigInt(obj)) {
1257
- return markBoxed(inspect(bigIntValueOf.call(obj)));
1258
- }
1259
- if (isBoolean(obj)) {
1260
- return markBoxed(booleanValueOf.call(obj));
1261
- }
1262
- if (isString(obj)) {
1263
- return markBoxed(inspect(String(obj)));
1264
- }
1265
- if (!isDate(obj) && !isRegExp$1(obj)) {
1266
- var ys = arrObjKeys(obj, inspect);
1267
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1268
- var protoTag = obj instanceof Object ? '' : 'null prototype';
1269
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1270
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1271
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1272
- if (ys.length === 0) { return tag + '{}'; }
1273
- if (indent) {
1274
- return tag + '{' + indentedJoin(ys, indent) + '}';
1275
- }
1276
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
1277
- }
1278
- return String(obj);
1279
- };
1280
-
1281
- function wrapQuotes(s, defaultStyle, opts) {
1282
- var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1283
- return quoteChar + s + quoteChar;
1284
- }
1285
-
1286
- function quote(s) {
1287
- return $replace.call(String(s), /"/g, '&quot;');
1288
- }
1289
-
1290
- function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1291
- function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1292
- function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1293
- function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1294
- function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1295
- function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1296
- function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1297
-
1298
- // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1299
- function isSymbol(obj) {
1300
- if (hasShammedSymbols) {
1301
- return obj && typeof obj === 'object' && obj instanceof Symbol;
1302
- }
1303
- if (typeof obj === 'symbol') {
1304
- return true;
1305
- }
1306
- if (!obj || typeof obj !== 'object' || !symToString) {
1307
- return false;
1308
- }
1309
- try {
1310
- symToString.call(obj);
1311
- return true;
1312
- } catch (e) {}
1313
- return false;
1314
- }
1315
-
1316
- function isBigInt(obj) {
1317
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1318
- return false;
1319
- }
1320
- try {
1321
- bigIntValueOf.call(obj);
1322
- return true;
1323
- } catch (e) {}
1324
- return false;
1325
- }
1326
-
1327
- var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1328
- function has$3(obj, key) {
1329
- return hasOwn.call(obj, key);
1330
- }
1331
-
1332
- function toStr(obj) {
1333
- return objectToString.call(obj);
1334
- }
1335
-
1336
- function nameOf(f) {
1337
- if (f.name) { return f.name; }
1338
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1339
- if (m) { return m[1]; }
1340
- return null;
1341
- }
1342
-
1343
- function indexOf$1(xs, x) {
1344
- if (xs.indexOf) { return xs.indexOf(x); }
1345
- for (var i = 0, l = xs.length; i < l; i++) {
1346
- if (xs[i] === x) { return i; }
1347
- }
1348
- return -1;
1349
- }
1350
-
1351
- function isMap(x) {
1352
- if (!mapSize || !x || typeof x !== 'object') {
1353
- return false;
1354
- }
1355
- try {
1356
- mapSize.call(x);
1357
- try {
1358
- setSize.call(x);
1359
- } catch (s) {
1360
- return true;
1361
- }
1362
- return x instanceof Map; // core-js workaround, pre-v2.5.0
1363
- } catch (e) {}
1364
- return false;
1365
- }
1366
-
1367
- function isWeakMap(x) {
1368
- if (!weakMapHas || !x || typeof x !== 'object') {
1369
- return false;
1370
- }
1371
- try {
1372
- weakMapHas.call(x, weakMapHas);
1373
- try {
1374
- weakSetHas.call(x, weakSetHas);
1375
- } catch (s) {
1376
- return true;
1377
- }
1378
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1379
- } catch (e) {}
1380
- return false;
1381
- }
1382
-
1383
- function isWeakRef(x) {
1384
- if (!weakRefDeref || !x || typeof x !== 'object') {
1385
- return false;
1386
- }
1387
- try {
1388
- weakRefDeref.call(x);
1389
- return true;
1390
- } catch (e) {}
1391
- return false;
1392
- }
1393
-
1394
- function isSet(x) {
1395
- if (!setSize || !x || typeof x !== 'object') {
1396
- return false;
1397
- }
1398
- try {
1399
- setSize.call(x);
1400
- try {
1401
- mapSize.call(x);
1402
- } catch (m) {
1403
- return true;
1404
- }
1405
- return x instanceof Set; // core-js workaround, pre-v2.5.0
1406
- } catch (e) {}
1407
- return false;
1408
- }
1409
-
1410
- function isWeakSet(x) {
1411
- if (!weakSetHas || !x || typeof x !== 'object') {
1412
- return false;
1413
- }
1414
- try {
1415
- weakSetHas.call(x, weakSetHas);
1416
- try {
1417
- weakMapHas.call(x, weakMapHas);
1418
- } catch (s) {
1419
- return true;
1420
- }
1421
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1422
- } catch (e) {}
1423
- return false;
1424
- }
1425
-
1426
- function isElement(x) {
1427
- if (!x || typeof x !== 'object') { return false; }
1428
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1429
- return true;
1430
- }
1431
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1432
- }
1433
-
1434
- function inspectString(str, opts) {
1435
- if (str.length > opts.maxStringLength) {
1436
- var remaining = str.length - opts.maxStringLength;
1437
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1438
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1439
- }
1440
- // eslint-disable-next-line no-control-regex
1441
- var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1442
- return wrapQuotes(s, 'single', opts);
1443
- }
1444
-
1445
- function lowbyte(c) {
1446
- var n = c.charCodeAt(0);
1447
- var x = {
1448
- 8: 'b',
1449
- 9: 't',
1450
- 10: 'n',
1451
- 12: 'f',
1452
- 13: 'r'
1453
- }[n];
1454
- if (x) { return '\\' + x; }
1455
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1456
- }
1457
-
1458
- function markBoxed(str) {
1459
- return 'Object(' + str + ')';
1460
- }
1461
-
1462
- function weakCollectionOf(type) {
1463
- return type + ' { ? }';
1464
- }
1465
-
1466
- function collectionOf(type, size, entries, indent) {
1467
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1468
- return type + ' (' + size + ') {' + joinedEntries + '}';
1469
- }
1470
-
1471
- function singleLineValues(xs) {
1472
- for (var i = 0; i < xs.length; i++) {
1473
- if (indexOf$1(xs[i], '\n') >= 0) {
1474
- return false;
1475
- }
1476
- }
1477
- return true;
1478
- }
1479
-
1480
- function getIndent(opts, depth) {
1481
- var baseIndent;
1482
- if (opts.indent === '\t') {
1483
- baseIndent = '\t';
1484
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1485
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
1486
- } else {
1487
- return null;
1488
- }
1489
- return {
1490
- base: baseIndent,
1491
- prev: $join.call(Array(depth + 1), baseIndent)
1492
- };
1493
- }
1494
-
1495
- function indentedJoin(xs, indent) {
1496
- if (xs.length === 0) { return ''; }
1497
- var lineJoiner = '\n' + indent.prev + indent.base;
1498
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1499
- }
1500
-
1501
- function arrObjKeys(obj, inspect) {
1502
- var isArr = isArray$3(obj);
1503
- var xs = [];
1504
- if (isArr) {
1505
- xs.length = obj.length;
1506
- for (var i = 0; i < obj.length; i++) {
1507
- xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1508
- }
1509
- }
1510
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1511
- var symMap;
1512
- if (hasShammedSymbols) {
1513
- symMap = {};
1514
- for (var k = 0; k < syms.length; k++) {
1515
- symMap['$' + syms[k]] = syms[k];
1516
- }
1517
- }
1518
-
1519
- for (var key in obj) { // eslint-disable-line no-restricted-syntax
1520
- if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1521
- if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1522
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1523
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1524
- continue; // eslint-disable-line no-restricted-syntax, no-continue
1525
- } else if ($test.call(/[^\w$]/, key)) {
1526
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1527
- } else {
1528
- xs.push(key + ': ' + inspect(obj[key], obj));
1529
- }
1530
- }
1531
- if (typeof gOPS === 'function') {
1532
- for (var j = 0; j < syms.length; j++) {
1533
- if (isEnumerable.call(obj, syms[j])) {
1534
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1535
- }
1536
- }
1537
- }
1538
- return xs;
1539
- }
1540
-
1541
- var GetIntrinsic = getIntrinsic;
1542
- var callBound = callBound$1;
1543
- var inspect = objectInspect;
1544
-
1545
- var $TypeError = GetIntrinsic('%TypeError%');
1546
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
1547
- var $Map = GetIntrinsic('%Map%', true);
1548
-
1549
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
1550
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
1551
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
1552
- var $mapGet = callBound('Map.prototype.get', true);
1553
- var $mapSet = callBound('Map.prototype.set', true);
1554
- var $mapHas = callBound('Map.prototype.has', true);
1555
-
1556
- /*
1557
- * This function traverses the list returning the node corresponding to the
1558
- * given key.
1559
- *
1560
- * That node is also moved to the head of the list, so that if it's accessed
1561
- * again we don't need to traverse the whole list. By doing so, all the recently
1562
- * used nodes can be accessed relatively quickly.
1563
- */
1564
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1565
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1566
- if (curr.key === key) {
1567
- prev.next = curr.next;
1568
- curr.next = list.next;
1569
- list.next = curr; // eslint-disable-line no-param-reassign
1570
- return curr;
1571
- }
1572
- }
1573
- };
1574
-
1575
- var listGet = function (objects, key) {
1576
- var node = listGetNode(objects, key);
1577
- return node && node.value;
1578
- };
1579
- var listSet = function (objects, key, value) {
1580
- var node = listGetNode(objects, key);
1581
- if (node) {
1582
- node.value = value;
1583
- } else {
1584
- // Prepend the new node to the beginning of the list
1585
- objects.next = { // eslint-disable-line no-param-reassign
1586
- key: key,
1587
- next: objects.next,
1588
- value: value
1589
- };
1590
- }
1591
- };
1592
- var listHas = function (objects, key) {
1593
- return !!listGetNode(objects, key);
1594
- };
1595
-
1596
- var sideChannel = function getSideChannel() {
1597
- var $wm;
1598
- var $m;
1599
- var $o;
1600
- var channel = {
1601
- assert: function (key) {
1602
- if (!channel.has(key)) {
1603
- throw new $TypeError('Side channel does not contain ' + inspect(key));
1604
- }
1605
- },
1606
- get: function (key) { // eslint-disable-line consistent-return
1607
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1608
- if ($wm) {
1609
- return $weakMapGet($wm, key);
1610
- }
1611
- } else if ($Map) {
1612
- if ($m) {
1613
- return $mapGet($m, key);
1614
- }
1615
- } else {
1616
- if ($o) { // eslint-disable-line no-lonely-if
1617
- return listGet($o, key);
1618
- }
1619
- }
1620
- },
1621
- has: function (key) {
1622
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1623
- if ($wm) {
1624
- return $weakMapHas($wm, key);
1625
- }
1626
- } else if ($Map) {
1627
- if ($m) {
1628
- return $mapHas($m, key);
1629
- }
1630
- } else {
1631
- if ($o) { // eslint-disable-line no-lonely-if
1632
- return listHas($o, key);
1633
- }
1634
- }
1635
- return false;
1636
- },
1637
- set: function (key, value) {
1638
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1639
- if (!$wm) {
1640
- $wm = new $WeakMap();
1641
- }
1642
- $weakMapSet($wm, key, value);
1643
- } else if ($Map) {
1644
- if (!$m) {
1645
- $m = new $Map();
1646
- }
1647
- $mapSet($m, key, value);
1648
- } else {
1649
- if (!$o) {
1650
- /*
1651
- * Initialize the linked list as an empty node, so that we don't have
1652
- * to special-case handling of the first node: we can always refer to
1653
- * it as (previous node).next, instead of something like (list).head
1654
- */
1655
- $o = { key: {}, next: null };
1656
- }
1657
- listSet($o, key, value);
1658
- }
1659
- }
1660
- };
1661
- return channel;
1662
- };
1663
-
1664
- var replace = String.prototype.replace;
1665
- var percentTwenties = /%20/g;
1666
-
1667
- var Format = {
1668
- RFC1738: 'RFC1738',
1669
- RFC3986: 'RFC3986'
1670
- };
1671
-
1672
- var formats$3 = {
1673
- 'default': Format.RFC3986,
1674
- formatters: {
1675
- RFC1738: function (value) {
1676
- return replace.call(value, percentTwenties, '+');
1677
- },
1678
- RFC3986: function (value) {
1679
- return String(value);
1680
- }
1681
- },
1682
- RFC1738: Format.RFC1738,
1683
- RFC3986: Format.RFC3986
1684
- };
1685
-
1686
- var formats$2 = formats$3;
1687
-
1688
- var has$2 = Object.prototype.hasOwnProperty;
1689
- var isArray$2 = Array.isArray;
1690
-
1691
- var hexTable = (function () {
1692
- var array = [];
1693
- for (var i = 0; i < 256; ++i) {
1694
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1695
- }
1696
-
1697
- return array;
1698
- }());
1699
-
1700
- var compactQueue = function compactQueue(queue) {
1701
- while (queue.length > 1) {
1702
- var item = queue.pop();
1703
- var obj = item.obj[item.prop];
1704
-
1705
- if (isArray$2(obj)) {
1706
- var compacted = [];
1707
-
1708
- for (var j = 0; j < obj.length; ++j) {
1709
- if (typeof obj[j] !== 'undefined') {
1710
- compacted.push(obj[j]);
1711
- }
1712
- }
1713
-
1714
- item.obj[item.prop] = compacted;
1715
- }
1716
- }
1717
- };
1718
-
1719
- var arrayToObject = function arrayToObject(source, options) {
1720
- var obj = options && options.plainObjects ? Object.create(null) : {};
1721
- for (var i = 0; i < source.length; ++i) {
1722
- if (typeof source[i] !== 'undefined') {
1723
- obj[i] = source[i];
1724
- }
1725
- }
1726
-
1727
- return obj;
1728
- };
1729
-
1730
- var merge = function merge(target, source, options) {
1731
- /* eslint no-param-reassign: 0 */
1732
- if (!source) {
1733
- return target;
1734
- }
1735
-
1736
- if (typeof source !== 'object') {
1737
- if (isArray$2(target)) {
1738
- target.push(source);
1739
- } else if (target && typeof target === 'object') {
1740
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1741
- target[source] = true;
1742
- }
1743
- } else {
1744
- return [target, source];
1745
- }
1746
-
1747
- return target;
1748
- }
1749
-
1750
- if (!target || typeof target !== 'object') {
1751
- return [target].concat(source);
1752
- }
1753
-
1754
- var mergeTarget = target;
1755
- if (isArray$2(target) && !isArray$2(source)) {
1756
- mergeTarget = arrayToObject(target, options);
1757
- }
1758
-
1759
- if (isArray$2(target) && isArray$2(source)) {
1760
- source.forEach(function (item, i) {
1761
- if (has$2.call(target, i)) {
1762
- var targetItem = target[i];
1763
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1764
- target[i] = merge(targetItem, item, options);
1765
- } else {
1766
- target.push(item);
1767
- }
1768
- } else {
1769
- target[i] = item;
1770
- }
1771
- });
1772
- return target;
1773
- }
1774
-
1775
- return Object.keys(source).reduce(function (acc, key) {
1776
- var value = source[key];
1777
-
1778
- if (has$2.call(acc, key)) {
1779
- acc[key] = merge(acc[key], value, options);
1780
- } else {
1781
- acc[key] = value;
1782
- }
1783
- return acc;
1784
- }, mergeTarget);
1785
- };
1786
-
1787
- var assign = function assignSingleSource(target, source) {
1788
- return Object.keys(source).reduce(function (acc, key) {
1789
- acc[key] = source[key];
1790
- return acc;
1791
- }, target);
1792
- };
1793
-
1794
- var decode = function (str, decoder, charset) {
1795
- var strWithoutPlus = str.replace(/\+/g, ' ');
1796
- if (charset === 'iso-8859-1') {
1797
- // unescape never throws, no try...catch needed:
1798
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1799
- }
1800
- // utf-8
1801
- try {
1802
- return decodeURIComponent(strWithoutPlus);
1803
- } catch (e) {
1804
- return strWithoutPlus;
1805
- }
1806
- };
1807
-
1808
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
1809
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1810
- // It has been adapted here for stricter adherence to RFC 3986
1811
- if (str.length === 0) {
1812
- return str;
1813
- }
1814
-
1815
- var string = str;
1816
- if (typeof str === 'symbol') {
1817
- string = Symbol.prototype.toString.call(str);
1818
- } else if (typeof str !== 'string') {
1819
- string = String(str);
1820
- }
1821
-
1822
- if (charset === 'iso-8859-1') {
1823
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1824
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1825
- });
1826
- }
1827
-
1828
- var out = '';
1829
- for (var i = 0; i < string.length; ++i) {
1830
- var c = string.charCodeAt(i);
1831
-
1832
- if (
1833
- c === 0x2D // -
1834
- || c === 0x2E // .
1835
- || c === 0x5F // _
1836
- || c === 0x7E // ~
1837
- || (c >= 0x30 && c <= 0x39) // 0-9
1838
- || (c >= 0x41 && c <= 0x5A) // a-z
1839
- || (c >= 0x61 && c <= 0x7A) // A-Z
1840
- || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1841
- ) {
1842
- out += string.charAt(i);
1843
- continue;
1844
- }
1845
-
1846
- if (c < 0x80) {
1847
- out = out + hexTable[c];
1848
- continue;
1849
- }
1850
-
1851
- if (c < 0x800) {
1852
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1853
- continue;
1854
- }
1855
-
1856
- if (c < 0xD800 || c >= 0xE000) {
1857
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1858
- continue;
1859
- }
1860
-
1861
- i += 1;
1862
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1863
- /* eslint operator-linebreak: [2, "before"] */
1864
- out += hexTable[0xF0 | (c >> 18)]
1865
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
1866
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
1867
- + hexTable[0x80 | (c & 0x3F)];
1868
- }
1869
-
1870
- return out;
1871
- };
1872
-
1873
- var compact = function compact(value) {
1874
- var queue = [{ obj: { o: value }, prop: 'o' }];
1875
- var refs = [];
1876
-
1877
- for (var i = 0; i < queue.length; ++i) {
1878
- var item = queue[i];
1879
- var obj = item.obj[item.prop];
1880
-
1881
- var keys = Object.keys(obj);
1882
- for (var j = 0; j < keys.length; ++j) {
1883
- var key = keys[j];
1884
- var val = obj[key];
1885
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1886
- queue.push({ obj: obj, prop: key });
1887
- refs.push(val);
1888
- }
1889
- }
1890
- }
1891
-
1892
- compactQueue(queue);
1893
-
1894
- return value;
1895
- };
1896
-
1897
- var isRegExp = function isRegExp(obj) {
1898
- return Object.prototype.toString.call(obj) === '[object RegExp]';
1899
- };
1900
-
1901
- var isBuffer = function isBuffer(obj) {
1902
- if (!obj || typeof obj !== 'object') {
1903
- return false;
1904
- }
1905
-
1906
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1907
- };
1908
-
1909
- var combine = function combine(a, b) {
1910
- return [].concat(a, b);
1911
- };
1912
-
1913
- var maybeMap = function maybeMap(val, fn) {
1914
- if (isArray$2(val)) {
1915
- var mapped = [];
1916
- for (var i = 0; i < val.length; i += 1) {
1917
- mapped.push(fn(val[i]));
1918
- }
1919
- return mapped;
1920
- }
1921
- return fn(val);
1922
- };
1923
-
1924
- var utils$2 = {
1925
- arrayToObject: arrayToObject,
1926
- assign: assign,
1927
- combine: combine,
1928
- compact: compact,
1929
- decode: decode,
1930
- encode: encode,
1931
- isBuffer: isBuffer,
1932
- isRegExp: isRegExp,
1933
- maybeMap: maybeMap,
1934
- merge: merge
1935
- };
1936
-
1937
- var getSideChannel = sideChannel;
1938
- var utils$1 = utils$2;
1939
- var formats$1 = formats$3;
1940
- var has$1 = Object.prototype.hasOwnProperty;
1941
-
1942
- var arrayPrefixGenerators = {
1943
- brackets: function brackets(prefix) {
1944
- return prefix + '[]';
1945
- },
1946
- comma: 'comma',
1947
- indices: function indices(prefix, key) {
1948
- return prefix + '[' + key + ']';
1949
- },
1950
- repeat: function repeat(prefix) {
1951
- return prefix;
1952
- }
1953
- };
1954
-
1955
- var isArray$1 = Array.isArray;
1956
- var split = String.prototype.split;
1957
- var push = Array.prototype.push;
1958
- var pushToArray = function (arr, valueOrArray) {
1959
- push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1960
- };
1961
-
1962
- var toISO = Date.prototype.toISOString;
1963
-
1964
- var defaultFormat = formats$1['default'];
1965
- var defaults$1 = {
1966
- addQueryPrefix: false,
1967
- allowDots: false,
1968
- charset: 'utf-8',
1969
- charsetSentinel: false,
1970
- delimiter: '&',
1971
- encode: true,
1972
- encoder: utils$1.encode,
1973
- encodeValuesOnly: false,
1974
- format: defaultFormat,
1975
- formatter: formats$1.formatters[defaultFormat],
1976
- // deprecated
1977
- indices: false,
1978
- serializeDate: function serializeDate(date) {
1979
- return toISO.call(date);
1980
- },
1981
- skipNulls: false,
1982
- strictNullHandling: false
1983
- };
1984
-
1985
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1986
- return typeof v === 'string'
1987
- || typeof v === 'number'
1988
- || typeof v === 'boolean'
1989
- || typeof v === 'symbol'
1990
- || typeof v === 'bigint';
1991
- };
1992
-
1993
- var sentinel = {};
1994
-
1995
- var stringify$1 = function stringify(
1996
- object,
1997
- prefix,
1998
- generateArrayPrefix,
1999
- commaRoundTrip,
2000
- strictNullHandling,
2001
- skipNulls,
2002
- encoder,
2003
- filter,
2004
- sort,
2005
- allowDots,
2006
- serializeDate,
2007
- format,
2008
- formatter,
2009
- encodeValuesOnly,
2010
- charset,
2011
- sideChannel
2012
- ) {
2013
- var obj = object;
2014
-
2015
- var tmpSc = sideChannel;
2016
- var step = 0;
2017
- var findFlag = false;
2018
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
2019
- // Where object last appeared in the ref tree
2020
- var pos = tmpSc.get(object);
2021
- step += 1;
2022
- if (typeof pos !== 'undefined') {
2023
- if (pos === step) {
2024
- throw new RangeError('Cyclic object value');
2025
- } else {
2026
- findFlag = true; // Break while
2027
- }
2028
- }
2029
- if (typeof tmpSc.get(sentinel) === 'undefined') {
2030
- step = 0;
2031
- }
2032
- }
2033
-
2034
- if (typeof filter === 'function') {
2035
- obj = filter(prefix, obj);
2036
- } else if (obj instanceof Date) {
2037
- obj = serializeDate(obj);
2038
- } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2039
- obj = utils$1.maybeMap(obj, function (value) {
2040
- if (value instanceof Date) {
2041
- return serializeDate(value);
2042
- }
2043
- return value;
2044
- });
2045
- }
2046
-
2047
- if (obj === null) {
2048
- if (strictNullHandling) {
2049
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
2050
- }
2051
-
2052
- obj = '';
2053
- }
2054
-
2055
- if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
2056
- if (encoder) {
2057
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
2058
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
2059
- var valuesArray = split.call(String(obj), ',');
2060
- var valuesJoined = '';
2061
- for (var i = 0; i < valuesArray.length; ++i) {
2062
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
2063
- }
2064
- return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
2065
- }
2066
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
2067
- }
2068
- return [formatter(prefix) + '=' + formatter(String(obj))];
2069
- }
2070
-
2071
- var values = [];
2072
-
2073
- if (typeof obj === 'undefined') {
2074
- return values;
2075
- }
2076
-
2077
- var objKeys;
2078
- if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2079
- // we need to join elements in
2080
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
2081
- } else if (isArray$1(filter)) {
2082
- objKeys = filter;
2083
- } else {
2084
- var keys = Object.keys(obj);
2085
- objKeys = sort ? keys.sort(sort) : keys;
2086
- }
2087
-
2088
- var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
2089
-
2090
- for (var j = 0; j < objKeys.length; ++j) {
2091
- var key = objKeys[j];
2092
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
2093
-
2094
- if (skipNulls && value === null) {
2095
- continue;
2096
- }
2097
-
2098
- var keyPrefix = isArray$1(obj)
2099
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
2100
- : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
2101
-
2102
- sideChannel.set(object, step);
2103
- var valueSideChannel = getSideChannel();
2104
- valueSideChannel.set(sentinel, sideChannel);
2105
- pushToArray(values, stringify(
2106
- value,
2107
- keyPrefix,
2108
- generateArrayPrefix,
2109
- commaRoundTrip,
2110
- strictNullHandling,
2111
- skipNulls,
2112
- encoder,
2113
- filter,
2114
- sort,
2115
- allowDots,
2116
- serializeDate,
2117
- format,
2118
- formatter,
2119
- encodeValuesOnly,
2120
- charset,
2121
- valueSideChannel
2122
- ));
2123
- }
2124
-
2125
- return values;
2126
- };
2127
-
2128
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2129
- if (!opts) {
2130
- return defaults$1;
2131
- }
2132
-
2133
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2134
- throw new TypeError('Encoder has to be a function.');
2135
- }
2136
-
2137
- var charset = opts.charset || defaults$1.charset;
2138
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2139
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2140
- }
2141
-
2142
- var format = formats$1['default'];
2143
- if (typeof opts.format !== 'undefined') {
2144
- if (!has$1.call(formats$1.formatters, opts.format)) {
2145
- throw new TypeError('Unknown format option provided.');
2146
- }
2147
- format = opts.format;
2148
- }
2149
- var formatter = formats$1.formatters[format];
2150
-
2151
- var filter = defaults$1.filter;
2152
- if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
2153
- filter = opts.filter;
2154
- }
2155
-
2156
- return {
2157
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
2158
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
2159
- charset: charset,
2160
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2161
- delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
2162
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
2163
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
2164
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
2165
- filter: filter,
2166
- format: format,
2167
- formatter: formatter,
2168
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
2169
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
2170
- sort: typeof opts.sort === 'function' ? opts.sort : null,
2171
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
2172
- };
2173
- };
2174
-
2175
- var stringify_1 = function (object, opts) {
2176
- var obj = object;
2177
- var options = normalizeStringifyOptions(opts);
2178
-
2179
- var objKeys;
2180
- var filter;
2181
-
2182
- if (typeof options.filter === 'function') {
2183
- filter = options.filter;
2184
- obj = filter('', obj);
2185
- } else if (isArray$1(options.filter)) {
2186
- filter = options.filter;
2187
- objKeys = filter;
2188
- }
2189
-
2190
- var keys = [];
2191
-
2192
- if (typeof obj !== 'object' || obj === null) {
2193
- return '';
2194
- }
2195
-
2196
- var arrayFormat;
2197
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2198
- arrayFormat = opts.arrayFormat;
2199
- } else if (opts && 'indices' in opts) {
2200
- arrayFormat = opts.indices ? 'indices' : 'repeat';
2201
- } else {
2202
- arrayFormat = 'indices';
2203
- }
2204
-
2205
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2206
- if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2207
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2208
- }
2209
- var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2210
-
2211
- if (!objKeys) {
2212
- objKeys = Object.keys(obj);
2213
- }
2214
-
2215
- if (options.sort) {
2216
- objKeys.sort(options.sort);
2217
- }
2218
-
2219
- var sideChannel = getSideChannel();
2220
- for (var i = 0; i < objKeys.length; ++i) {
2221
- var key = objKeys[i];
2222
-
2223
- if (options.skipNulls && obj[key] === null) {
2224
- continue;
2225
- }
2226
- pushToArray(keys, stringify$1(
2227
- obj[key],
2228
- key,
2229
- generateArrayPrefix,
2230
- commaRoundTrip,
2231
- options.strictNullHandling,
2232
- options.skipNulls,
2233
- options.encode ? options.encoder : null,
2234
- options.filter,
2235
- options.sort,
2236
- options.allowDots,
2237
- options.serializeDate,
2238
- options.format,
2239
- options.formatter,
2240
- options.encodeValuesOnly,
2241
- options.charset,
2242
- sideChannel
2243
- ));
2244
- }
2245
-
2246
- var joined = keys.join(options.delimiter);
2247
- var prefix = options.addQueryPrefix === true ? '?' : '';
2248
-
2249
- if (options.charsetSentinel) {
2250
- if (options.charset === 'iso-8859-1') {
2251
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
2252
- prefix += 'utf8=%26%2310003%3B&';
2253
- } else {
2254
- // encodeURIComponent('✓')
2255
- prefix += 'utf8=%E2%9C%93&';
2256
- }
2257
- }
2258
-
2259
- return joined.length > 0 ? prefix + joined : '';
2260
- };
2261
-
2262
- var utils = utils$2;
2263
-
2264
- var has = Object.prototype.hasOwnProperty;
2265
- var isArray = Array.isArray;
2266
-
2267
- var defaults = {
2268
- allowDots: false,
2269
- allowPrototypes: false,
2270
- allowSparse: false,
2271
- arrayLimit: 20,
2272
- charset: 'utf-8',
2273
- charsetSentinel: false,
2274
- comma: false,
2275
- decoder: utils.decode,
2276
- delimiter: '&',
2277
- depth: 5,
2278
- ignoreQueryPrefix: false,
2279
- interpretNumericEntities: false,
2280
- parameterLimit: 1000,
2281
- parseArrays: true,
2282
- plainObjects: false,
2283
- strictNullHandling: false
2284
- };
2285
-
2286
- var interpretNumericEntities = function (str) {
2287
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2288
- return String.fromCharCode(parseInt(numberStr, 10));
2289
- });
2290
- };
2291
-
2292
- var parseArrayValue = function (val, options) {
2293
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2294
- return val.split(',');
2295
- }
2296
-
2297
- return val;
2298
- };
2299
-
2300
- // This is what browsers will submit when the ✓ character occurs in an
2301
- // application/x-www-form-urlencoded body and the encoding of the page containing
2302
- // the form is iso-8859-1, or when the submitted form has an accept-charset
2303
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2304
- // the ✓ character, such as us-ascii.
2305
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2306
-
2307
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2308
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2309
-
2310
- var parseValues = function parseQueryStringValues(str, options) {
2311
- var obj = {};
2312
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2313
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2314
- var parts = cleanStr.split(options.delimiter, limit);
2315
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2316
- var i;
2317
-
2318
- var charset = options.charset;
2319
- if (options.charsetSentinel) {
2320
- for (i = 0; i < parts.length; ++i) {
2321
- if (parts[i].indexOf('utf8=') === 0) {
2322
- if (parts[i] === charsetSentinel) {
2323
- charset = 'utf-8';
2324
- } else if (parts[i] === isoSentinel) {
2325
- charset = 'iso-8859-1';
2326
- }
2327
- skipIndex = i;
2328
- i = parts.length; // The eslint settings do not allow break;
2329
- }
2330
- }
2331
- }
2332
-
2333
- for (i = 0; i < parts.length; ++i) {
2334
- if (i === skipIndex) {
2335
- continue;
2336
- }
2337
- var part = parts[i];
2338
-
2339
- var bracketEqualsPos = part.indexOf(']=');
2340
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2341
-
2342
- var key, val;
2343
- if (pos === -1) {
2344
- key = options.decoder(part, defaults.decoder, charset, 'key');
2345
- val = options.strictNullHandling ? null : '';
2346
- } else {
2347
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2348
- val = utils.maybeMap(
2349
- parseArrayValue(part.slice(pos + 1), options),
2350
- function (encodedVal) {
2351
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2352
- }
2353
- );
2354
- }
2355
-
2356
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2357
- val = interpretNumericEntities(val);
2358
- }
2359
-
2360
- if (part.indexOf('[]=') > -1) {
2361
- val = isArray(val) ? [val] : val;
2362
- }
2363
-
2364
- if (has.call(obj, key)) {
2365
- obj[key] = utils.combine(obj[key], val);
2366
- } else {
2367
- obj[key] = val;
2368
- }
2369
- }
2370
-
2371
- return obj;
2372
- };
2373
-
2374
- var parseObject = function (chain, val, options, valuesParsed) {
2375
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
2376
-
2377
- for (var i = chain.length - 1; i >= 0; --i) {
2378
- var obj;
2379
- var root = chain[i];
2380
-
2381
- if (root === '[]' && options.parseArrays) {
2382
- obj = [].concat(leaf);
2383
- } else {
2384
- obj = options.plainObjects ? Object.create(null) : {};
2385
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2386
- var index = parseInt(cleanRoot, 10);
2387
- if (!options.parseArrays && cleanRoot === '') {
2388
- obj = { 0: leaf };
2389
- } else if (
2390
- !isNaN(index)
2391
- && root !== cleanRoot
2392
- && String(index) === cleanRoot
2393
- && index >= 0
2394
- && (options.parseArrays && index <= options.arrayLimit)
2395
- ) {
2396
- obj = [];
2397
- obj[index] = leaf;
2398
- } else if (cleanRoot !== '__proto__') {
2399
- obj[cleanRoot] = leaf;
2400
- }
2401
- }
2402
-
2403
- leaf = obj;
2404
- }
2405
-
2406
- return leaf;
2407
- };
2408
-
2409
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2410
- if (!givenKey) {
2411
- return;
2412
- }
2413
-
2414
- // Transform dot notation to bracket notation
2415
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2416
-
2417
- // The regex chunks
2418
-
2419
- var brackets = /(\[[^[\]]*])/;
2420
- var child = /(\[[^[\]]*])/g;
2421
-
2422
- // Get the parent
2423
-
2424
- var segment = options.depth > 0 && brackets.exec(key);
2425
- var parent = segment ? key.slice(0, segment.index) : key;
2426
-
2427
- // Stash the parent if it exists
2428
-
2429
- var keys = [];
2430
- if (parent) {
2431
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2432
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
2433
- if (!options.allowPrototypes) {
2434
- return;
2435
- }
2436
- }
2437
-
2438
- keys.push(parent);
2439
- }
2440
-
2441
- // Loop through children appending to the array until we hit depth
2442
-
2443
- var i = 0;
2444
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2445
- i += 1;
2446
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2447
- if (!options.allowPrototypes) {
2448
- return;
2449
- }
2450
- }
2451
- keys.push(segment[1]);
2452
- }
2453
-
2454
- // If there's a remainder, just add whatever is left
2455
-
2456
- if (segment) {
2457
- keys.push('[' + key.slice(segment.index) + ']');
2458
- }
2459
-
2460
- return parseObject(keys, val, options, valuesParsed);
2461
- };
2462
-
2463
- var normalizeParseOptions = function normalizeParseOptions(opts) {
2464
- if (!opts) {
2465
- return defaults;
2466
- }
2467
-
2468
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2469
- throw new TypeError('Decoder has to be a function.');
2470
- }
2471
-
2472
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2473
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2474
- }
2475
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2476
-
2477
- return {
2478
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2479
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2480
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2481
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2482
- charset: charset,
2483
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2484
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2485
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2486
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2487
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2488
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2489
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2490
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2491
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2492
- parseArrays: opts.parseArrays !== false,
2493
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2494
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2495
- };
2496
- };
2497
-
2498
- var parse$1 = function (str, opts) {
2499
- var options = normalizeParseOptions(opts);
2500
-
2501
- if (str === '' || str === null || typeof str === 'undefined') {
2502
- return options.plainObjects ? Object.create(null) : {};
2503
- }
2504
-
2505
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2506
- var obj = options.plainObjects ? Object.create(null) : {};
2507
-
2508
- // Iterate over the keys and setup the new object
2509
-
2510
- var keys = Object.keys(tempObj);
2511
- for (var i = 0; i < keys.length; ++i) {
2512
- var key = keys[i];
2513
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2514
- obj = utils.merge(obj, newObj, options);
2515
- }
2516
-
2517
- if (options.allowSparse === true) {
2518
- return obj;
2519
- }
2520
-
2521
- return utils.compact(obj);
2522
- };
2523
-
2524
- var stringify = stringify_1;
2525
- var parse = parse$1;
2526
- var formats = formats$3;
2527
-
2528
- var lib = {
2529
- formats: formats,
2530
- parse: parse,
2531
- stringify: stringify
2532
- };
2533
-
2534
501
  var _this = undefined;
2535
502
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2536
503
  function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -2618,7 +585,7 @@ var buildUrl = function buildUrl(route, params) {
2618
585
  route = route.replace(":".concat(key), encodeURIComponent(value));
2619
586
  }
2620
587
  });
2621
- var queryParams = ramda.pipe(ramda.omit(placeHolders), neetoCist.preprocessForSerialization, lib.stringify)(params);
588
+ var queryParams = ramda.pipe(ramda.omit(placeHolders), neetoCist.preprocessForSerialization, qs.stringify)(params);
2622
589
  return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
2623
590
  };
2624
591
  var toLocale = function toLocale(number) {
@@ -2628,7 +595,7 @@ var toLocale = function toLocale(number) {
2628
595
  };
2629
596
  var getQueryParams = function getQueryParams() {
2630
597
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2631
- return lib.parse(location.search, _objectSpread$1({
598
+ return qs.parse(location.search, _objectSpread$1({
2632
599
  ignoreQueryPrefix: true
2633
600
  }, options));
2634
601
  };
@@ -2667,10 +634,10 @@ var getFromLocalStorage = function getFromLocalStorage(key) {
2667
634
  }
2668
635
  };
2669
636
  var setToLocalStorage = function setToLocalStorage(key, value) {
2670
- if (ramda.isNotNil(value)) localStorage.setItem(key, JSON.stringify(value));else localStorage.removeItem(key);
637
+ return localStorage.setItem(key, JSON.stringify(value));
2671
638
  };
2672
639
  var removeFromLocalStorage = function removeFromLocalStorage(key) {
2673
- localStorage.removeItem(key);
640
+ return localStorage.removeItem(key);
2674
641
  };
2675
642
 
2676
643
  dayjs__default["default"].extend(relativeTime__default["default"]);