@bigbinary/neeto-playwright-commons 1.9.11 → 1.9.12

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/index.cjs.js CHANGED
@@ -11,21 +11,21 @@ var Path = require('path');
11
11
  var faker = require('@faker-js/faker');
12
12
  var MailosaurClient = require('mailosaur');
13
13
  var dayjs = require('dayjs');
14
- var require$$1$1 = require('tty');
14
+ var require$$0$4 = require('tty');
15
15
  var require$$0$3 = require('os');
16
16
  var Stream$4 = require('stream');
17
- var require$$0$4 = require('events');
17
+ var require$$0$5 = require('events');
18
18
  var playwrightI18nextFixture = require('playwright-i18next-fixture');
19
19
  var neetoCist = require('@bigbinary/neeto-cist');
20
20
  var http$1 = require('http');
21
21
  var Url = require('url');
22
- var require$$0$5 = require('punycode');
22
+ var require$$0$6 = require('punycode');
23
23
  var https$1 = require('https');
24
24
  var zlib$5 = require('zlib');
25
- var require$$0$6 = require('assert');
25
+ var require$$0$7 = require('assert');
26
26
  var require$$3 = require('buffer');
27
27
  var require$$3$1 = require('querystring');
28
- var require$$1$2 = require('string_decoder');
28
+ var require$$1$1 = require('string_decoder');
29
29
  var require$$4$1 = require('timers');
30
30
  var require$$3$2 = require('crypto');
31
31
 
@@ -57,19 +57,19 @@ var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);
57
57
  var Path__namespace = /*#__PURE__*/_interopNamespace(Path);
58
58
  var MailosaurClient__default = /*#__PURE__*/_interopDefaultLegacy(MailosaurClient);
59
59
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
60
- var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
60
+ var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
61
61
  var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
62
62
  var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream$4);
63
- var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
63
+ var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$5);
64
64
  var http__default = /*#__PURE__*/_interopDefaultLegacy(http$1);
65
65
  var Url__default = /*#__PURE__*/_interopDefaultLegacy(Url);
66
- var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$5);
66
+ var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$6);
67
67
  var https__default = /*#__PURE__*/_interopDefaultLegacy(https$1);
68
68
  var zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib$5);
69
- var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$6);
69
+ var require$$0__default$5 = /*#__PURE__*/_interopDefaultLegacy(require$$0$7);
70
70
  var require$$3__default = /*#__PURE__*/_interopDefaultLegacy(require$$3);
71
71
  var require$$3__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$3$1);
72
- var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$2);
72
+ var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
73
73
  var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4$1);
74
74
  var require$$3__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$3$2);
75
75
 
@@ -391,6 +391,27 @@ function getAugmentedNamespace(n) {
391
391
  return a;
392
392
  }
393
393
 
394
+ /** @type {import('.')} */
395
+ var esErrors = Error;
396
+
397
+ /** @type {import('./eval')} */
398
+ var _eval = EvalError;
399
+
400
+ /** @type {import('./range')} */
401
+ var range = RangeError;
402
+
403
+ /** @type {import('./ref')} */
404
+ var ref = ReferenceError;
405
+
406
+ /** @type {import('./syntax')} */
407
+ var syntax = SyntaxError;
408
+
409
+ /** @type {import('./type')} */
410
+ var type = TypeError;
411
+
412
+ /** @type {import('./uri')} */
413
+ var uri = URIError;
414
+
394
415
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
395
416
  var shams = function hasSymbols() {
396
417
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
@@ -435,7 +456,7 @@ var shams = function hasSymbols() {
435
456
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
436
457
  var hasSymbolSham = shams;
437
458
 
438
- var hasSymbols$1 = function hasNativeSymbols() {
459
+ var hasSymbols$2 = function hasNativeSymbols() {
439
460
  if (typeof origSymbol !== 'function') { return false; }
440
461
  if (typeof Symbol !== 'function') { return false; }
441
462
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -450,7 +471,7 @@ var test = {
450
471
 
451
472
  var $Object = Object;
452
473
 
453
- var hasProto$1 = function hasProto() {
474
+ var hasProto$2 = function hasProto() {
454
475
  return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
455
476
  };
456
477
 
@@ -543,10 +564,761 @@ var functionBind = Function.prototype.bind || implementation;
543
564
 
544
565
  var call = Function.prototype.call;
545
566
  var $hasOwn = Object.prototype.hasOwnProperty;
546
- var bind$1 = functionBind;
567
+ var bind$2 = functionBind;
547
568
 
548
569
  /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
549
- var hasown = bind$1.call(call, $hasOwn);
570
+ var hasown = bind$2.call(call, $hasOwn);
571
+
572
+ var undefined$2;
573
+
574
+ var $Error = esErrors;
575
+ var $EvalError = _eval;
576
+ var $RangeError = range;
577
+ var $ReferenceError = ref;
578
+ var $SyntaxError$2 = syntax;
579
+ var $TypeError$4 = type;
580
+ var $URIError = uri;
581
+
582
+ var $Function$1 = Function;
583
+
584
+ // eslint-disable-next-line consistent-return
585
+ var getEvalledConstructor$1 = function (expressionSyntax) {
586
+ try {
587
+ return $Function$1('"use strict"; return (' + expressionSyntax + ').constructor;')();
588
+ } catch (e) {}
589
+ };
590
+
591
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
592
+ if ($gOPD$2) {
593
+ try {
594
+ $gOPD$2({}, '');
595
+ } catch (e) {
596
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
597
+ }
598
+ }
599
+
600
+ var throwTypeError$1 = function () {
601
+ throw new $TypeError$4();
602
+ };
603
+ var ThrowTypeError$1 = $gOPD$2
604
+ ? (function () {
605
+ try {
606
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
607
+ arguments.callee; // IE 8 does not throw here
608
+ return throwTypeError$1;
609
+ } catch (calleeThrows) {
610
+ try {
611
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
612
+ return $gOPD$2(arguments, 'callee').get;
613
+ } catch (gOPDthrows) {
614
+ return throwTypeError$1;
615
+ }
616
+ }
617
+ }())
618
+ : throwTypeError$1;
619
+
620
+ var hasSymbols$1 = hasSymbols$2();
621
+ var hasProto$1 = hasProto$2();
622
+
623
+ var getProto$1 = Object.getPrototypeOf || (
624
+ hasProto$1
625
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
626
+ : null
627
+ );
628
+
629
+ var needsEval$1 = {};
630
+
631
+ var TypedArray$1 = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$2 : getProto$1(Uint8Array);
632
+
633
+ var INTRINSICS$1 = {
634
+ __proto__: null,
635
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$2 : AggregateError,
636
+ '%Array%': Array,
637
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer,
638
+ '%ArrayIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$2,
639
+ '%AsyncFromSyncIteratorPrototype%': undefined$2,
640
+ '%AsyncFunction%': needsEval$1,
641
+ '%AsyncGenerator%': needsEval$1,
642
+ '%AsyncGeneratorFunction%': needsEval$1,
643
+ '%AsyncIteratorPrototype%': needsEval$1,
644
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$2 : Atomics,
645
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$2 : BigInt,
646
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$2 : BigInt64Array,
647
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$2 : BigUint64Array,
648
+ '%Boolean%': Boolean,
649
+ '%DataView%': typeof DataView === 'undefined' ? undefined$2 : DataView,
650
+ '%Date%': Date,
651
+ '%decodeURI%': decodeURI,
652
+ '%decodeURIComponent%': decodeURIComponent,
653
+ '%encodeURI%': encodeURI,
654
+ '%encodeURIComponent%': encodeURIComponent,
655
+ '%Error%': $Error,
656
+ '%eval%': eval, // eslint-disable-line no-eval
657
+ '%EvalError%': $EvalError,
658
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array,
659
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array,
660
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$2 : FinalizationRegistry,
661
+ '%Function%': $Function$1,
662
+ '%GeneratorFunction%': needsEval$1,
663
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array,
664
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$2 : Int16Array,
665
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array,
666
+ '%isFinite%': isFinite,
667
+ '%isNaN%': isNaN,
668
+ '%IteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$2,
669
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$2,
670
+ '%Map%': typeof Map === 'undefined' ? undefined$2 : Map,
671
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Map()[Symbol.iterator]()),
672
+ '%Math%': Math,
673
+ '%Number%': Number,
674
+ '%Object%': Object,
675
+ '%parseFloat%': parseFloat,
676
+ '%parseInt%': parseInt,
677
+ '%Promise%': typeof Promise === 'undefined' ? undefined$2 : Promise,
678
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$2 : Proxy,
679
+ '%RangeError%': $RangeError,
680
+ '%ReferenceError%': $ReferenceError,
681
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$2 : Reflect,
682
+ '%RegExp%': RegExp,
683
+ '%Set%': typeof Set === 'undefined' ? undefined$2 : Set,
684
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Set()[Symbol.iterator]()),
685
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer,
686
+ '%String%': String,
687
+ '%StringIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$2,
688
+ '%Symbol%': hasSymbols$1 ? Symbol : undefined$2,
689
+ '%SyntaxError%': $SyntaxError$2,
690
+ '%ThrowTypeError%': ThrowTypeError$1,
691
+ '%TypedArray%': TypedArray$1,
692
+ '%TypeError%': $TypeError$4,
693
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array,
694
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray,
695
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array,
696
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array,
697
+ '%URIError%': $URIError,
698
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap,
699
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$2 : WeakRef,
700
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet
701
+ };
702
+
703
+ if (getProto$1) {
704
+ try {
705
+ null.error; // eslint-disable-line no-unused-expressions
706
+ } catch (e) {
707
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
708
+ var errorProto$1 = getProto$1(getProto$1(e));
709
+ INTRINSICS$1['%Error.prototype%'] = errorProto$1;
710
+ }
711
+ }
712
+
713
+ var doEval$1 = function doEval(name) {
714
+ var value;
715
+ if (name === '%AsyncFunction%') {
716
+ value = getEvalledConstructor$1('async function () {}');
717
+ } else if (name === '%GeneratorFunction%') {
718
+ value = getEvalledConstructor$1('function* () {}');
719
+ } else if (name === '%AsyncGeneratorFunction%') {
720
+ value = getEvalledConstructor$1('async function* () {}');
721
+ } else if (name === '%AsyncGenerator%') {
722
+ var fn = doEval('%AsyncGeneratorFunction%');
723
+ if (fn) {
724
+ value = fn.prototype;
725
+ }
726
+ } else if (name === '%AsyncIteratorPrototype%') {
727
+ var gen = doEval('%AsyncGenerator%');
728
+ if (gen && getProto$1) {
729
+ value = getProto$1(gen.prototype);
730
+ }
731
+ }
732
+
733
+ INTRINSICS$1[name] = value;
734
+
735
+ return value;
736
+ };
737
+
738
+ var LEGACY_ALIASES$1 = {
739
+ __proto__: null,
740
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
741
+ '%ArrayPrototype%': ['Array', 'prototype'],
742
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
743
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
744
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
745
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
746
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
747
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
748
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
749
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
750
+ '%DataViewPrototype%': ['DataView', 'prototype'],
751
+ '%DatePrototype%': ['Date', 'prototype'],
752
+ '%ErrorPrototype%': ['Error', 'prototype'],
753
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
754
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
755
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
756
+ '%FunctionPrototype%': ['Function', 'prototype'],
757
+ '%Generator%': ['GeneratorFunction', 'prototype'],
758
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
759
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
760
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
761
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
762
+ '%JSONParse%': ['JSON', 'parse'],
763
+ '%JSONStringify%': ['JSON', 'stringify'],
764
+ '%MapPrototype%': ['Map', 'prototype'],
765
+ '%NumberPrototype%': ['Number', 'prototype'],
766
+ '%ObjectPrototype%': ['Object', 'prototype'],
767
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
768
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
769
+ '%PromisePrototype%': ['Promise', 'prototype'],
770
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
771
+ '%Promise_all%': ['Promise', 'all'],
772
+ '%Promise_reject%': ['Promise', 'reject'],
773
+ '%Promise_resolve%': ['Promise', 'resolve'],
774
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
775
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
776
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
777
+ '%SetPrototype%': ['Set', 'prototype'],
778
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
779
+ '%StringPrototype%': ['String', 'prototype'],
780
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
781
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
782
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
783
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
784
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
785
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
786
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
787
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
788
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
789
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
790
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
791
+ };
792
+
793
+ var bind$1 = functionBind;
794
+ var hasOwn$2 = hasown;
795
+ var $concat$2 = bind$1.call(Function.call, Array.prototype.concat);
796
+ var $spliceApply$1 = bind$1.call(Function.apply, Array.prototype.splice);
797
+ var $replace$2 = bind$1.call(Function.call, String.prototype.replace);
798
+ var $strSlice$1 = bind$1.call(Function.call, String.prototype.slice);
799
+ var $exec$1 = bind$1.call(Function.call, RegExp.prototype.exec);
800
+
801
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
802
+ var rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
803
+ var reEscapeChar$1 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
804
+ var stringToPath$1 = function stringToPath(string) {
805
+ var first = $strSlice$1(string, 0, 1);
806
+ var last = $strSlice$1(string, -1);
807
+ if (first === '%' && last !== '%') {
808
+ throw new $SyntaxError$2('invalid intrinsic syntax, expected closing `%`');
809
+ } else if (last === '%' && first !== '%') {
810
+ throw new $SyntaxError$2('invalid intrinsic syntax, expected opening `%`');
811
+ }
812
+ var result = [];
813
+ $replace$2(string, rePropName$1, function (match, number, quote, subString) {
814
+ result[result.length] = quote ? $replace$2(subString, reEscapeChar$1, '$1') : number || match;
815
+ });
816
+ return result;
817
+ };
818
+ /* end adaptation */
819
+
820
+ var getBaseIntrinsic$1 = function getBaseIntrinsic(name, allowMissing) {
821
+ var intrinsicName = name;
822
+ var alias;
823
+ if (hasOwn$2(LEGACY_ALIASES$1, intrinsicName)) {
824
+ alias = LEGACY_ALIASES$1[intrinsicName];
825
+ intrinsicName = '%' + alias[0] + '%';
826
+ }
827
+
828
+ if (hasOwn$2(INTRINSICS$1, intrinsicName)) {
829
+ var value = INTRINSICS$1[intrinsicName];
830
+ if (value === needsEval$1) {
831
+ value = doEval$1(intrinsicName);
832
+ }
833
+ if (typeof value === 'undefined' && !allowMissing) {
834
+ throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
835
+ }
836
+
837
+ return {
838
+ alias: alias,
839
+ name: intrinsicName,
840
+ value: value
841
+ };
842
+ }
843
+
844
+ throw new $SyntaxError$2('intrinsic ' + name + ' does not exist!');
845
+ };
846
+
847
+ var getIntrinsic$2 = function GetIntrinsic(name, allowMissing) {
848
+ if (typeof name !== 'string' || name.length === 0) {
849
+ throw new $TypeError$4('intrinsic name must be a non-empty string');
850
+ }
851
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
852
+ throw new $TypeError$4('"allowMissing" argument must be a boolean');
853
+ }
854
+
855
+ if ($exec$1(/^%?[^%]*%?$/, name) === null) {
856
+ throw new $SyntaxError$2('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
857
+ }
858
+ var parts = stringToPath$1(name);
859
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
860
+
861
+ var intrinsic = getBaseIntrinsic$1('%' + intrinsicBaseName + '%', allowMissing);
862
+ var intrinsicRealName = intrinsic.name;
863
+ var value = intrinsic.value;
864
+ var skipFurtherCaching = false;
865
+
866
+ var alias = intrinsic.alias;
867
+ if (alias) {
868
+ intrinsicBaseName = alias[0];
869
+ $spliceApply$1(parts, $concat$2([0, 1], alias));
870
+ }
871
+
872
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
873
+ var part = parts[i];
874
+ var first = $strSlice$1(part, 0, 1);
875
+ var last = $strSlice$1(part, -1);
876
+ if (
877
+ (
878
+ (first === '"' || first === "'" || first === '`')
879
+ || (last === '"' || last === "'" || last === '`')
880
+ )
881
+ && first !== last
882
+ ) {
883
+ throw new $SyntaxError$2('property names with quotes must have matching quotes');
884
+ }
885
+ if (part === 'constructor' || !isOwn) {
886
+ skipFurtherCaching = true;
887
+ }
888
+
889
+ intrinsicBaseName += '.' + part;
890
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
891
+
892
+ if (hasOwn$2(INTRINSICS$1, intrinsicRealName)) {
893
+ value = INTRINSICS$1[intrinsicRealName];
894
+ } else if (value != null) {
895
+ if (!(part in value)) {
896
+ if (!allowMissing) {
897
+ throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
898
+ }
899
+ return void undefined$2;
900
+ }
901
+ if ($gOPD$2 && (i + 1) >= parts.length) {
902
+ var desc = $gOPD$2(value, part);
903
+ isOwn = !!desc;
904
+
905
+ // By convention, when a data property is converted to an accessor
906
+ // property to emulate a data property that does not suffer from
907
+ // the override mistake, that accessor's getter is marked with
908
+ // an `originalValue` property. Here, when we detect this, we
909
+ // uphold the illusion by pretending to see that original data
910
+ // property, i.e., returning the value rather than the getter
911
+ // itself.
912
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
913
+ value = desc.get;
914
+ } else {
915
+ value = value[part];
916
+ }
917
+ } else {
918
+ isOwn = hasOwn$2(value, part);
919
+ value = value[part];
920
+ }
921
+
922
+ if (isOwn && !skipFurtherCaching) {
923
+ INTRINSICS$1[intrinsicRealName] = value;
924
+ }
925
+ }
926
+ }
927
+ return value;
928
+ };
929
+
930
+ var callBind$1 = {exports: {}};
931
+
932
+ var getIntrinsic$1;
933
+ var hasRequiredGetIntrinsic;
934
+
935
+ function requireGetIntrinsic () {
936
+ if (hasRequiredGetIntrinsic) return getIntrinsic$1;
937
+ hasRequiredGetIntrinsic = 1;
938
+
939
+ var undefined$1;
940
+
941
+ var $Error = esErrors;
942
+ var $EvalError = _eval;
943
+ var $RangeError = range;
944
+ var $ReferenceError = ref;
945
+ var $SyntaxError = syntax;
946
+ var $TypeError = type;
947
+ var $URIError = uri;
948
+
949
+ var $Function = Function;
950
+
951
+ // eslint-disable-next-line consistent-return
952
+ var getEvalledConstructor = function (expressionSyntax) {
953
+ try {
954
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
955
+ } catch (e) {}
956
+ };
957
+
958
+ var $gOPD = Object.getOwnPropertyDescriptor;
959
+ if ($gOPD) {
960
+ try {
961
+ $gOPD({}, '');
962
+ } catch (e) {
963
+ $gOPD = null; // this is IE 8, which has a broken gOPD
964
+ }
965
+ }
966
+
967
+ var throwTypeError = function () {
968
+ throw new $TypeError();
969
+ };
970
+ var ThrowTypeError = $gOPD
971
+ ? (function () {
972
+ try {
973
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
974
+ arguments.callee; // IE 8 does not throw here
975
+ return throwTypeError;
976
+ } catch (calleeThrows) {
977
+ try {
978
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
979
+ return $gOPD(arguments, 'callee').get;
980
+ } catch (gOPDthrows) {
981
+ return throwTypeError;
982
+ }
983
+ }
984
+ }())
985
+ : throwTypeError;
986
+
987
+ var hasSymbols = hasSymbols$2();
988
+ var hasProto = hasProto$2();
989
+
990
+ var getProto = Object.getPrototypeOf || (
991
+ hasProto
992
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
993
+ : null
994
+ );
995
+
996
+ var needsEval = {};
997
+
998
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
999
+
1000
+ var INTRINSICS = {
1001
+ __proto__: null,
1002
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1003
+ '%Array%': Array,
1004
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1005
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
1006
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
1007
+ '%AsyncFunction%': needsEval,
1008
+ '%AsyncGenerator%': needsEval,
1009
+ '%AsyncGeneratorFunction%': needsEval,
1010
+ '%AsyncIteratorPrototype%': needsEval,
1011
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1012
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1013
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
1014
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
1015
+ '%Boolean%': Boolean,
1016
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1017
+ '%Date%': Date,
1018
+ '%decodeURI%': decodeURI,
1019
+ '%decodeURIComponent%': decodeURIComponent,
1020
+ '%encodeURI%': encodeURI,
1021
+ '%encodeURIComponent%': encodeURIComponent,
1022
+ '%Error%': $Error,
1023
+ '%eval%': eval, // eslint-disable-line no-eval
1024
+ '%EvalError%': $EvalError,
1025
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1026
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1027
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1028
+ '%Function%': $Function,
1029
+ '%GeneratorFunction%': needsEval,
1030
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1031
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1032
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1033
+ '%isFinite%': isFinite,
1034
+ '%isNaN%': isNaN,
1035
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1036
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1037
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1038
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1039
+ '%Math%': Math,
1040
+ '%Number%': Number,
1041
+ '%Object%': Object,
1042
+ '%parseFloat%': parseFloat,
1043
+ '%parseInt%': parseInt,
1044
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1045
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1046
+ '%RangeError%': $RangeError,
1047
+ '%ReferenceError%': $ReferenceError,
1048
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1049
+ '%RegExp%': RegExp,
1050
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1051
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1052
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1053
+ '%String%': String,
1054
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
1055
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
1056
+ '%SyntaxError%': $SyntaxError,
1057
+ '%ThrowTypeError%': ThrowTypeError,
1058
+ '%TypedArray%': TypedArray,
1059
+ '%TypeError%': $TypeError,
1060
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1061
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1062
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1063
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1064
+ '%URIError%': $URIError,
1065
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1066
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1067
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1068
+ };
1069
+
1070
+ if (getProto) {
1071
+ try {
1072
+ null.error; // eslint-disable-line no-unused-expressions
1073
+ } catch (e) {
1074
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1075
+ var errorProto = getProto(getProto(e));
1076
+ INTRINSICS['%Error.prototype%'] = errorProto;
1077
+ }
1078
+ }
1079
+
1080
+ var doEval = function doEval(name) {
1081
+ var value;
1082
+ if (name === '%AsyncFunction%') {
1083
+ value = getEvalledConstructor('async function () {}');
1084
+ } else if (name === '%GeneratorFunction%') {
1085
+ value = getEvalledConstructor('function* () {}');
1086
+ } else if (name === '%AsyncGeneratorFunction%') {
1087
+ value = getEvalledConstructor('async function* () {}');
1088
+ } else if (name === '%AsyncGenerator%') {
1089
+ var fn = doEval('%AsyncGeneratorFunction%');
1090
+ if (fn) {
1091
+ value = fn.prototype;
1092
+ }
1093
+ } else if (name === '%AsyncIteratorPrototype%') {
1094
+ var gen = doEval('%AsyncGenerator%');
1095
+ if (gen && getProto) {
1096
+ value = getProto(gen.prototype);
1097
+ }
1098
+ }
1099
+
1100
+ INTRINSICS[name] = value;
1101
+
1102
+ return value;
1103
+ };
1104
+
1105
+ var LEGACY_ALIASES = {
1106
+ __proto__: null,
1107
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1108
+ '%ArrayPrototype%': ['Array', 'prototype'],
1109
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1110
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1111
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1112
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1113
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1114
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1115
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1116
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
1117
+ '%DataViewPrototype%': ['DataView', 'prototype'],
1118
+ '%DatePrototype%': ['Date', 'prototype'],
1119
+ '%ErrorPrototype%': ['Error', 'prototype'],
1120
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1121
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1122
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1123
+ '%FunctionPrototype%': ['Function', 'prototype'],
1124
+ '%Generator%': ['GeneratorFunction', 'prototype'],
1125
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1126
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1127
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1128
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1129
+ '%JSONParse%': ['JSON', 'parse'],
1130
+ '%JSONStringify%': ['JSON', 'stringify'],
1131
+ '%MapPrototype%': ['Map', 'prototype'],
1132
+ '%NumberPrototype%': ['Number', 'prototype'],
1133
+ '%ObjectPrototype%': ['Object', 'prototype'],
1134
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1135
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1136
+ '%PromisePrototype%': ['Promise', 'prototype'],
1137
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1138
+ '%Promise_all%': ['Promise', 'all'],
1139
+ '%Promise_reject%': ['Promise', 'reject'],
1140
+ '%Promise_resolve%': ['Promise', 'resolve'],
1141
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1142
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1143
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
1144
+ '%SetPrototype%': ['Set', 'prototype'],
1145
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1146
+ '%StringPrototype%': ['String', 'prototype'],
1147
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
1148
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1149
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1150
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1151
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1152
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1153
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1154
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1155
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
1156
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1157
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1158
+ };
1159
+
1160
+ var bind = functionBind;
1161
+ var hasOwn = hasown;
1162
+ var $concat = bind.call(Function.call, Array.prototype.concat);
1163
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1164
+ var $replace = bind.call(Function.call, String.prototype.replace);
1165
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
1166
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
1167
+
1168
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1169
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1170
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1171
+ var stringToPath = function stringToPath(string) {
1172
+ var first = $strSlice(string, 0, 1);
1173
+ var last = $strSlice(string, -1);
1174
+ if (first === '%' && last !== '%') {
1175
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
1176
+ } else if (last === '%' && first !== '%') {
1177
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
1178
+ }
1179
+ var result = [];
1180
+ $replace(string, rePropName, function (match, number, quote, subString) {
1181
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1182
+ });
1183
+ return result;
1184
+ };
1185
+ /* end adaptation */
1186
+
1187
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1188
+ var intrinsicName = name;
1189
+ var alias;
1190
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
1191
+ alias = LEGACY_ALIASES[intrinsicName];
1192
+ intrinsicName = '%' + alias[0] + '%';
1193
+ }
1194
+
1195
+ if (hasOwn(INTRINSICS, intrinsicName)) {
1196
+ var value = INTRINSICS[intrinsicName];
1197
+ if (value === needsEval) {
1198
+ value = doEval(intrinsicName);
1199
+ }
1200
+ if (typeof value === 'undefined' && !allowMissing) {
1201
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1202
+ }
1203
+
1204
+ return {
1205
+ alias: alias,
1206
+ name: intrinsicName,
1207
+ value: value
1208
+ };
1209
+ }
1210
+
1211
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
1212
+ };
1213
+
1214
+ getIntrinsic$1 = function GetIntrinsic(name, allowMissing) {
1215
+ if (typeof name !== 'string' || name.length === 0) {
1216
+ throw new $TypeError('intrinsic name must be a non-empty string');
1217
+ }
1218
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1219
+ throw new $TypeError('"allowMissing" argument must be a boolean');
1220
+ }
1221
+
1222
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
1223
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1224
+ }
1225
+ var parts = stringToPath(name);
1226
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1227
+
1228
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1229
+ var intrinsicRealName = intrinsic.name;
1230
+ var value = intrinsic.value;
1231
+ var skipFurtherCaching = false;
1232
+
1233
+ var alias = intrinsic.alias;
1234
+ if (alias) {
1235
+ intrinsicBaseName = alias[0];
1236
+ $spliceApply(parts, $concat([0, 1], alias));
1237
+ }
1238
+
1239
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1240
+ var part = parts[i];
1241
+ var first = $strSlice(part, 0, 1);
1242
+ var last = $strSlice(part, -1);
1243
+ if (
1244
+ (
1245
+ (first === '"' || first === "'" || first === '`')
1246
+ || (last === '"' || last === "'" || last === '`')
1247
+ )
1248
+ && first !== last
1249
+ ) {
1250
+ throw new $SyntaxError('property names with quotes must have matching quotes');
1251
+ }
1252
+ if (part === 'constructor' || !isOwn) {
1253
+ skipFurtherCaching = true;
1254
+ }
1255
+
1256
+ intrinsicBaseName += '.' + part;
1257
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
1258
+
1259
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
1260
+ value = INTRINSICS[intrinsicRealName];
1261
+ } else if (value != null) {
1262
+ if (!(part in value)) {
1263
+ if (!allowMissing) {
1264
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1265
+ }
1266
+ return void undefined$1;
1267
+ }
1268
+ if ($gOPD && (i + 1) >= parts.length) {
1269
+ var desc = $gOPD(value, part);
1270
+ isOwn = !!desc;
1271
+
1272
+ // By convention, when a data property is converted to an accessor
1273
+ // property to emulate a data property that does not suffer from
1274
+ // the override mistake, that accessor's getter is marked with
1275
+ // an `originalValue` property. Here, when we detect this, we
1276
+ // uphold the illusion by pretending to see that original data
1277
+ // property, i.e., returning the value rather than the getter
1278
+ // itself.
1279
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1280
+ value = desc.get;
1281
+ } else {
1282
+ value = value[part];
1283
+ }
1284
+ } else {
1285
+ isOwn = hasOwn(value, part);
1286
+ value = value[part];
1287
+ }
1288
+
1289
+ if (isOwn && !skipFurtherCaching) {
1290
+ INTRINSICS[intrinsicRealName] = value;
1291
+ }
1292
+ }
1293
+ }
1294
+ return value;
1295
+ };
1296
+ return getIntrinsic$1;
1297
+ }
1298
+
1299
+ var esDefineProperty;
1300
+ var hasRequiredEsDefineProperty;
1301
+
1302
+ function requireEsDefineProperty () {
1303
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
1304
+ hasRequiredEsDefineProperty = 1;
1305
+
1306
+ var GetIntrinsic = requireGetIntrinsic();
1307
+
1308
+ /** @type {import('.')} */
1309
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
1310
+ if ($defineProperty) {
1311
+ try {
1312
+ $defineProperty({}, 'a', { value: 1 });
1313
+ } catch (e) {
1314
+ // IE 8 has a broken defineProperty
1315
+ $defineProperty = false;
1316
+ }
1317
+ }
1318
+
1319
+ esDefineProperty = $defineProperty;
1320
+ return esDefineProperty;
1321
+ }
550
1322
 
551
1323
  var undefined$1;
552
1324
 
@@ -590,8 +1362,8 @@ var ThrowTypeError = $gOPD$1
590
1362
  }())
591
1363
  : throwTypeError;
592
1364
 
593
- var hasSymbols = hasSymbols$1();
594
- var hasProto = hasProto$1();
1365
+ var hasSymbols = hasSymbols$2();
1366
+ var hasProto = hasProto$2();
595
1367
 
596
1368
  var getProto = Object.getPrototypeOf || (
597
1369
  hasProto
@@ -898,43 +1670,9 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
898
1670
  return value;
899
1671
  };
900
1672
 
901
- var callBind$1 = {exports: {}};
902
-
903
- var GetIntrinsic$5 = getIntrinsic;
904
-
905
- var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
906
-
907
- var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
908
- if ($defineProperty$1) {
909
- try {
910
- $defineProperty$1({}, 'a', { value: 1 });
911
- return true;
912
- } catch (e) {
913
- // IE 8 has a broken defineProperty
914
- return false;
915
- }
916
- }
917
- return false;
918
- };
919
-
920
- hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
921
- // node v0.6 has a bug where array lengths can be Set but not Defined
922
- if (!hasPropertyDescriptors$1()) {
923
- return null;
924
- }
925
- try {
926
- return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
927
- } catch (e) {
928
- // In Firefox 4-22, defining length on an array throws an exception.
929
- return true;
930
- }
931
- };
932
-
933
- var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
934
-
935
- var GetIntrinsic$4 = getIntrinsic;
1673
+ var GetIntrinsic$3 = getIntrinsic;
936
1674
 
937
- var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
1675
+ var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
938
1676
 
939
1677
  if ($gOPD) {
940
1678
  try {
@@ -947,26 +1685,14 @@ if ($gOPD) {
947
1685
 
948
1686
  var gopd$1 = $gOPD;
949
1687
 
950
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
1688
+ var $defineProperty$1 = requireEsDefineProperty();
951
1689
 
952
- var GetIntrinsic$3 = getIntrinsic;
953
-
954
- var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
955
- if ($defineProperty) {
956
- try {
957
- $defineProperty({}, 'a', { value: 1 });
958
- } catch (e) {
959
- // IE 8 has a broken defineProperty
960
- $defineProperty = false;
961
- }
962
- }
963
-
964
- var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
965
- var $TypeError$2 = GetIntrinsic$3('%TypeError%');
1690
+ var $SyntaxError = syntax;
1691
+ var $TypeError$2 = type;
966
1692
 
967
1693
  var gopd = gopd$1;
968
1694
 
969
- /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
1695
+ /** @type {import('.')} */
970
1696
  var defineDataProperty = function defineDataProperty(
971
1697
  obj,
972
1698
  property,
@@ -999,8 +1725,8 @@ var defineDataProperty = function defineDataProperty(
999
1725
  /* @type {false | TypedPropertyDescriptor<unknown>} */
1000
1726
  var desc = !!gopd && gopd(obj, property);
1001
1727
 
1002
- if ($defineProperty) {
1003
- $defineProperty(obj, property, {
1728
+ if ($defineProperty$1) {
1729
+ $defineProperty$1(obj, property, {
1004
1730
  configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
1005
1731
  enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
1006
1732
  value: value,
@@ -1014,14 +1740,38 @@ var defineDataProperty = function defineDataProperty(
1014
1740
  }
1015
1741
  };
1016
1742
 
1017
- var GetIntrinsic$2 = getIntrinsic;
1743
+ var $defineProperty = requireEsDefineProperty();
1744
+
1745
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
1746
+ return !!$defineProperty;
1747
+ };
1748
+
1749
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
1750
+ // node v0.6 has a bug where array lengths can be Set but not Defined
1751
+ if (!$defineProperty) {
1752
+ return null;
1753
+ }
1754
+ try {
1755
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
1756
+ } catch (e) {
1757
+ // In Firefox 4-22, defining length on an array throws an exception.
1758
+ return true;
1759
+ }
1760
+ };
1761
+
1762
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
1763
+
1764
+ var GetIntrinsic$2 = getIntrinsic$2;
1018
1765
  var define = defineDataProperty;
1019
1766
  var hasDescriptors = hasPropertyDescriptors_1();
1020
1767
  var gOPD = gopd$1;
1021
1768
 
1022
- var $TypeError$1 = GetIntrinsic$2('%TypeError%');
1769
+ var $TypeError$1 = type;
1023
1770
  var $floor$1 = GetIntrinsic$2('%Math.floor%');
1024
1771
 
1772
+ /** @typedef {(...args: unknown[]) => unknown} Func */
1773
+
1774
+ /** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
1025
1775
  var setFunctionLength = function setFunctionLength(fn, length) {
1026
1776
  if (typeof fn !== 'function') {
1027
1777
  throw new $TypeError$1('`fn` is not a function');
@@ -1046,9 +1796,9 @@ var setFunctionLength = function setFunctionLength(fn, length) {
1046
1796
 
1047
1797
  if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
1048
1798
  if (hasDescriptors) {
1049
- define(fn, 'length', length, true, true);
1799
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
1050
1800
  } else {
1051
- define(fn, 'length', length);
1801
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
1052
1802
  }
1053
1803
  }
1054
1804
  return fn;
@@ -1059,26 +1809,17 @@ callBind$1.exports;
1059
1809
  (function (module) {
1060
1810
 
1061
1811
  var bind = functionBind;
1062
- var GetIntrinsic = getIntrinsic;
1812
+ var GetIntrinsic = getIntrinsic$2;
1063
1813
  var setFunctionLength$1 = setFunctionLength;
1064
1814
 
1065
- var $TypeError = GetIntrinsic('%TypeError%');
1815
+ var $TypeError = type;
1066
1816
  var $apply = GetIntrinsic('%Function.prototype.apply%');
1067
1817
  var $call = GetIntrinsic('%Function.prototype.call%');
1068
1818
  var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
1069
1819
 
1070
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
1820
+ var $defineProperty = requireEsDefineProperty();
1071
1821
  var $max = GetIntrinsic('%Math.max%');
1072
1822
 
1073
- if ($defineProperty) {
1074
- try {
1075
- $defineProperty({}, 'a', { value: 1 });
1076
- } catch (e) {
1077
- // IE 8 has a broken defineProperty
1078
- $defineProperty = null;
1079
- }
1080
- }
1081
-
1082
1823
  module.exports = function callBind(originalFunction) {
1083
1824
  if (typeof originalFunction !== 'function') {
1084
1825
  throw new $TypeError('a function is required');
@@ -1104,7 +1845,7 @@ callBind$1.exports;
1104
1845
 
1105
1846
  var callBindExports = callBind$1.exports;
1106
1847
 
1107
- var GetIntrinsic$1 = getIntrinsic;
1848
+ var GetIntrinsic$1 = getIntrinsic$2;
1108
1849
 
1109
1850
  var callBind = callBindExports;
1110
1851
 
@@ -1645,11 +2386,11 @@ function arrObjKeys(obj, inspect) {
1645
2386
  return xs;
1646
2387
  }
1647
2388
 
1648
- var GetIntrinsic = getIntrinsic;
2389
+ var GetIntrinsic = getIntrinsic$2;
1649
2390
  var callBound = callBound$1;
1650
2391
  var inspect = objectInspect;
1651
2392
 
1652
- var $TypeError = GetIntrinsic('%TypeError%');
2393
+ var $TypeError = type;
1653
2394
  var $WeakMap = GetIntrinsic('%WeakMap%', true);
1654
2395
  var $Map = GetIntrinsic('%Map%', true);
1655
2396
 
@@ -1661,49 +2402,58 @@ var $mapSet = callBound('Map.prototype.set', true);
1661
2402
  var $mapHas = callBound('Map.prototype.has', true);
1662
2403
 
1663
2404
  /*
1664
- * This function traverses the list returning the node corresponding to the
1665
- * given key.
1666
- *
1667
- * That node is also moved to the head of the list, so that if it's accessed
1668
- * again we don't need to traverse the whole list. By doing so, all the recently
1669
- * used nodes can be accessed relatively quickly.
1670
- */
2405
+ * This function traverses the list returning the node corresponding to the given key.
2406
+ *
2407
+ * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
2408
+ */
2409
+ /** @type {import('.').listGetNode} */
1671
2410
  var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1672
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
2411
+ /** @type {typeof list | NonNullable<(typeof list)['next']>} */
2412
+ var prev = list;
2413
+ /** @type {(typeof list)['next']} */
2414
+ var curr;
2415
+ for (; (curr = prev.next) !== null; prev = curr) {
1673
2416
  if (curr.key === key) {
1674
2417
  prev.next = curr.next;
1675
- curr.next = list.next;
2418
+ // eslint-disable-next-line no-extra-parens
2419
+ curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
1676
2420
  list.next = curr; // eslint-disable-line no-param-reassign
1677
2421
  return curr;
1678
2422
  }
1679
2423
  }
1680
2424
  };
1681
2425
 
2426
+ /** @type {import('.').listGet} */
1682
2427
  var listGet = function (objects, key) {
1683
2428
  var node = listGetNode(objects, key);
1684
2429
  return node && node.value;
1685
2430
  };
2431
+ /** @type {import('.').listSet} */
1686
2432
  var listSet = function (objects, key, value) {
1687
2433
  var node = listGetNode(objects, key);
1688
2434
  if (node) {
1689
2435
  node.value = value;
1690
2436
  } else {
1691
2437
  // Prepend the new node to the beginning of the list
1692
- objects.next = { // eslint-disable-line no-param-reassign
2438
+ objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
1693
2439
  key: key,
1694
2440
  next: objects.next,
1695
2441
  value: value
1696
- };
2442
+ });
1697
2443
  }
1698
2444
  };
2445
+ /** @type {import('.').listHas} */
1699
2446
  var listHas = function (objects, key) {
1700
2447
  return !!listGetNode(objects, key);
1701
2448
  };
1702
2449
 
2450
+ /** @type {import('.')} */
1703
2451
  var sideChannel = function getSideChannel() {
1704
- var $wm;
1705
- var $m;
1706
- var $o;
2452
+ /** @type {WeakMap<object, unknown>} */ var $wm;
2453
+ /** @type {Map<object, unknown>} */ var $m;
2454
+ /** @type {import('.').RootNode<unknown>} */ var $o;
2455
+
2456
+ /** @type {import('.').Channel} */
1707
2457
  var channel = {
1708
2458
  assert: function (key) {
1709
2459
  if (!channel.has(key)) {
@@ -1754,11 +2504,7 @@ var sideChannel = function getSideChannel() {
1754
2504
  $mapSet($m, key, value);
1755
2505
  } else {
1756
2506
  if (!$o) {
1757
- /*
1758
- * Initialize the linked list as an empty node, so that we don't have
1759
- * to special-case handling of the first node: we can always refer to
1760
- * it as (previous node).next, instead of something like (list).head
1761
- */
2507
+ // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
1762
2508
  $o = { key: {}, next: null };
1763
2509
  }
1764
2510
  listSet($o, key, value);
@@ -2071,10 +2817,13 @@ var defaultFormat = formats$1['default'];
2071
2817
  var defaults$2 = {
2072
2818
  addQueryPrefix: false,
2073
2819
  allowDots: false,
2820
+ allowEmptyArrays: false,
2821
+ arrayFormat: 'indices',
2074
2822
  charset: 'utf-8',
2075
2823
  charsetSentinel: false,
2076
2824
  delimiter: '&',
2077
2825
  encode: true,
2826
+ encodeDotInKeys: false,
2078
2827
  encoder: utils$n.encode,
2079
2828
  encodeValuesOnly: false,
2080
2829
  format: defaultFormat,
@@ -2103,8 +2852,10 @@ var stringify$6 = function stringify(
2103
2852
  prefix,
2104
2853
  generateArrayPrefix,
2105
2854
  commaRoundTrip,
2855
+ allowEmptyArrays,
2106
2856
  strictNullHandling,
2107
2857
  skipNulls,
2858
+ encodeDotInKeys,
2108
2859
  encoder,
2109
2860
  filter,
2110
2861
  sort,
@@ -2186,7 +2937,13 @@ var stringify$6 = function stringify(
2186
2937
  objKeys = sort ? keys.sort(sort) : keys;
2187
2938
  }
2188
2939
 
2189
- var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
2940
+ var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
2941
+
2942
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
2943
+
2944
+ if (allowEmptyArrays && isArray$1(obj) && obj.length === 0) {
2945
+ return adjustedPrefix + '[]';
2946
+ }
2190
2947
 
2191
2948
  for (var j = 0; j < objKeys.length; ++j) {
2192
2949
  var key = objKeys[j];
@@ -2196,9 +2953,10 @@ var stringify$6 = function stringify(
2196
2953
  continue;
2197
2954
  }
2198
2955
 
2956
+ var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
2199
2957
  var keyPrefix = isArray$1(obj)
2200
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
2201
- : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
2958
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
2959
+ : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
2202
2960
 
2203
2961
  sideChannel.set(object, step);
2204
2962
  var valueSideChannel = getSideChannel();
@@ -2208,8 +2966,10 @@ var stringify$6 = function stringify(
2208
2966
  keyPrefix,
2209
2967
  generateArrayPrefix,
2210
2968
  commaRoundTrip,
2969
+ allowEmptyArrays,
2211
2970
  strictNullHandling,
2212
2971
  skipNulls,
2972
+ encodeDotInKeys,
2213
2973
  generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2214
2974
  filter,
2215
2975
  sort,
@@ -2231,6 +2991,14 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2231
2991
  return defaults$2;
2232
2992
  }
2233
2993
 
2994
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
2995
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
2996
+ }
2997
+
2998
+ if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
2999
+ throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
3000
+ }
3001
+
2234
3002
  if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2235
3003
  throw new TypeError('Encoder has to be a function.');
2236
3004
  }
@@ -2254,13 +3022,32 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2254
3022
  filter = opts.filter;
2255
3023
  }
2256
3024
 
3025
+ var arrayFormat;
3026
+ if (opts.arrayFormat in arrayPrefixGenerators) {
3027
+ arrayFormat = opts.arrayFormat;
3028
+ } else if ('indices' in opts) {
3029
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
3030
+ } else {
3031
+ arrayFormat = defaults$2.arrayFormat;
3032
+ }
3033
+
3034
+ if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
3035
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
3036
+ }
3037
+
3038
+ var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults$2.allowDots : !!opts.allowDots;
3039
+
2257
3040
  return {
2258
3041
  addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$2.addQueryPrefix,
2259
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$2.allowDots : !!opts.allowDots,
3042
+ allowDots: allowDots,
3043
+ allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults$2.allowEmptyArrays,
3044
+ arrayFormat: arrayFormat,
2260
3045
  charset: charset,
2261
3046
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$2.charsetSentinel,
3047
+ commaRoundTrip: opts.commaRoundTrip,
2262
3048
  delimiter: typeof opts.delimiter === 'undefined' ? defaults$2.delimiter : opts.delimiter,
2263
3049
  encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$2.encode,
3050
+ encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults$2.encodeDotInKeys,
2264
3051
  encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$2.encoder,
2265
3052
  encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$2.encodeValuesOnly,
2266
3053
  filter: filter,
@@ -2294,20 +3081,8 @@ var stringify_1 = function (object, opts) {
2294
3081
  return '';
2295
3082
  }
2296
3083
 
2297
- var arrayFormat;
2298
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2299
- arrayFormat = opts.arrayFormat;
2300
- } else if (opts && 'indices' in opts) {
2301
- arrayFormat = opts.indices ? 'indices' : 'repeat';
2302
- } else {
2303
- arrayFormat = 'indices';
2304
- }
2305
-
2306
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2307
- if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2308
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2309
- }
2310
- var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
3084
+ var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
3085
+ var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
2311
3086
 
2312
3087
  if (!objKeys) {
2313
3088
  objKeys = Object.keys(obj);
@@ -2329,8 +3104,10 @@ var stringify_1 = function (object, opts) {
2329
3104
  key,
2330
3105
  generateArrayPrefix,
2331
3106
  commaRoundTrip,
3107
+ options.allowEmptyArrays,
2332
3108
  options.strictNullHandling,
2333
3109
  options.skipNulls,
3110
+ options.encodeDotInKeys,
2334
3111
  options.encode ? options.encoder : null,
2335
3112
  options.filter,
2336
3113
  options.sort,
@@ -2367,15 +3144,18 @@ var isArray = Array.isArray;
2367
3144
 
2368
3145
  var defaults$1 = {
2369
3146
  allowDots: false,
3147
+ allowEmptyArrays: false,
2370
3148
  allowPrototypes: false,
2371
3149
  allowSparse: false,
2372
3150
  arrayLimit: 20,
2373
3151
  charset: 'utf-8',
2374
3152
  charsetSentinel: false,
2375
3153
  comma: false,
3154
+ decodeDotInKeys: true,
2376
3155
  decoder: utils$m.decode,
2377
3156
  delimiter: '&',
2378
3157
  depth: 5,
3158
+ duplicates: 'combine',
2379
3159
  ignoreQueryPrefix: false,
2380
3160
  interpretNumericEntities: false,
2381
3161
  parameterLimit: 1000,
@@ -2463,9 +3243,10 @@ var parseValues = function parseQueryStringValues(str, options) {
2463
3243
  val = isArray(val) ? [val] : val;
2464
3244
  }
2465
3245
 
2466
- if (has.call(obj, key)) {
3246
+ var existing = has.call(obj, key);
3247
+ if (existing && options.duplicates === 'combine') {
2467
3248
  obj[key] = utils$m.combine(obj[key], val);
2468
- } else {
3249
+ } else if (!existing || options.duplicates === 'last') {
2469
3250
  obj[key] = val;
2470
3251
  }
2471
3252
  }
@@ -2481,24 +3262,25 @@ var parseObject = function (chain, val, options, valuesParsed) {
2481
3262
  var root = chain[i];
2482
3263
 
2483
3264
  if (root === '[]' && options.parseArrays) {
2484
- obj = [].concat(leaf);
3265
+ obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf);
2485
3266
  } else {
2486
3267
  obj = options.plainObjects ? Object.create(null) : {};
2487
3268
  var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2488
- var index = parseInt(cleanRoot, 10);
2489
- if (!options.parseArrays && cleanRoot === '') {
3269
+ var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
3270
+ var index = parseInt(decodedRoot, 10);
3271
+ if (!options.parseArrays && decodedRoot === '') {
2490
3272
  obj = { 0: leaf };
2491
3273
  } else if (
2492
3274
  !isNaN(index)
2493
- && root !== cleanRoot
2494
- && String(index) === cleanRoot
3275
+ && root !== decodedRoot
3276
+ && String(index) === decodedRoot
2495
3277
  && index >= 0
2496
3278
  && (options.parseArrays && index <= options.arrayLimit)
2497
3279
  ) {
2498
3280
  obj = [];
2499
3281
  obj[index] = leaf;
2500
- } else if (cleanRoot !== '__proto__') {
2501
- obj[cleanRoot] = leaf;
3282
+ } else if (decodedRoot !== '__proto__') {
3283
+ obj[decodedRoot] = leaf;
2502
3284
  }
2503
3285
  }
2504
3286
 
@@ -2567,7 +3349,15 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
2567
3349
  return defaults$1;
2568
3350
  }
2569
3351
 
2570
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
3352
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
3353
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
3354
+ }
3355
+
3356
+ if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
3357
+ throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
3358
+ }
3359
+
3360
+ if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
2571
3361
  throw new TypeError('Decoder has to be a function.');
2572
3362
  }
2573
3363
 
@@ -2576,18 +3366,29 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
2576
3366
  }
2577
3367
  var charset = typeof opts.charset === 'undefined' ? defaults$1.charset : opts.charset;
2578
3368
 
3369
+ var duplicates = typeof opts.duplicates === 'undefined' ? defaults$1.duplicates : opts.duplicates;
3370
+
3371
+ if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
3372
+ throw new TypeError('The duplicates option must be either combine, first, or last');
3373
+ }
3374
+
3375
+ var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults$1.allowDots : !!opts.allowDots;
3376
+
2579
3377
  return {
2580
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
3378
+ allowDots: allowDots,
3379
+ allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults$1.allowEmptyArrays,
2581
3380
  allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults$1.allowPrototypes,
2582
3381
  allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults$1.allowSparse,
2583
3382
  arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults$1.arrayLimit,
2584
3383
  charset: charset,
2585
3384
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2586
3385
  comma: typeof opts.comma === 'boolean' ? opts.comma : defaults$1.comma,
3386
+ decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults$1.decodeDotInKeys,
2587
3387
  decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults$1.decoder,
2588
3388
  delimiter: typeof opts.delimiter === 'string' || utils$m.isRegExp(opts.delimiter) ? opts.delimiter : defaults$1.delimiter,
2589
3389
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2590
3390
  depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults$1.depth,
3391
+ duplicates: duplicates,
2591
3392
  ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2592
3393
  interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults$1.interpretNumericEntities,
2593
3394
  parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults$1.parameterLimit,
@@ -3603,12 +4404,12 @@ var hasRequiredHasFlag;
3603
4404
  function requireHasFlag () {
3604
4405
  if (hasRequiredHasFlag) return hasFlag;
3605
4406
  hasRequiredHasFlag = 1;
3606
-
3607
- hasFlag = (flag, argv = process.argv) => {
4407
+ hasFlag = (flag, argv) => {
4408
+ argv = argv || process.argv;
3608
4409
  const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
3609
- const position = argv.indexOf(prefix + flag);
3610
- const terminatorPosition = argv.indexOf('--');
3611
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
4410
+ const pos = argv.indexOf(prefix + flag);
4411
+ const terminatorPos = argv.indexOf('--');
4412
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
3612
4413
  };
3613
4414
  return hasFlag;
3614
4415
  }
@@ -3620,32 +4421,23 @@ function requireSupportsColor () {
3620
4421
  if (hasRequiredSupportsColor) return supportsColor_1;
3621
4422
  hasRequiredSupportsColor = 1;
3622
4423
  const os = require$$0__default$1["default"];
3623
- const tty = require$$1__default["default"];
3624
4424
  const hasFlag = requireHasFlag();
3625
4425
 
3626
- const {env} = process;
4426
+ const env = process.env;
3627
4427
 
3628
4428
  let forceColor;
3629
4429
  if (hasFlag('no-color') ||
3630
4430
  hasFlag('no-colors') ||
3631
- hasFlag('color=false') ||
3632
- hasFlag('color=never')) {
3633
- forceColor = 0;
4431
+ hasFlag('color=false')) {
4432
+ forceColor = false;
3634
4433
  } else if (hasFlag('color') ||
3635
4434
  hasFlag('colors') ||
3636
4435
  hasFlag('color=true') ||
3637
4436
  hasFlag('color=always')) {
3638
- forceColor = 1;
4437
+ forceColor = true;
3639
4438
  }
3640
-
3641
4439
  if ('FORCE_COLOR' in env) {
3642
- if (env.FORCE_COLOR === 'true') {
3643
- forceColor = 1;
3644
- } else if (env.FORCE_COLOR === 'false') {
3645
- forceColor = 0;
3646
- } else {
3647
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
3648
- }
4440
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
3649
4441
  }
3650
4442
 
3651
4443
  function translateLevel(level) {
@@ -3661,8 +4453,8 @@ function requireSupportsColor () {
3661
4453
  };
3662
4454
  }
3663
4455
 
3664
- function supportsColor(haveStream, streamIsTTY) {
3665
- if (forceColor === 0) {
4456
+ function supportsColor(stream) {
4457
+ if (forceColor === false) {
3666
4458
  return 0;
3667
4459
  }
3668
4460
 
@@ -3676,21 +4468,22 @@ function requireSupportsColor () {
3676
4468
  return 2;
3677
4469
  }
3678
4470
 
3679
- if (haveStream && !streamIsTTY && forceColor === undefined) {
4471
+ if (stream && !stream.isTTY && forceColor !== true) {
3680
4472
  return 0;
3681
4473
  }
3682
4474
 
3683
- const min = forceColor || 0;
3684
-
3685
- if (env.TERM === 'dumb') {
3686
- return min;
3687
- }
4475
+ const min = forceColor ? 1 : 0;
3688
4476
 
3689
4477
  if (process.platform === 'win32') {
3690
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
3691
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
4478
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
4479
+ // libuv that enables 256 color output on Windows. Anything earlier and it
4480
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
4481
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
4482
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
4483
+ // that supports 16m/TrueColor.
3692
4484
  const osRelease = os.release().split('.');
3693
4485
  if (
4486
+ Number(process.versions.node.split('.')[0]) >= 8 &&
3694
4487
  Number(osRelease[0]) >= 10 &&
3695
4488
  Number(osRelease[2]) >= 10586
3696
4489
  ) {
@@ -3701,7 +4494,7 @@ function requireSupportsColor () {
3701
4494
  }
3702
4495
 
3703
4496
  if ('CI' in env) {
3704
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
4497
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
3705
4498
  return 1;
3706
4499
  }
3707
4500
 
@@ -3740,18 +4533,22 @@ function requireSupportsColor () {
3740
4533
  return 1;
3741
4534
  }
3742
4535
 
4536
+ if (env.TERM === 'dumb') {
4537
+ return min;
4538
+ }
4539
+
3743
4540
  return min;
3744
4541
  }
3745
4542
 
3746
4543
  function getSupportLevel(stream) {
3747
- const level = supportsColor(stream, stream && stream.isTTY);
4544
+ const level = supportsColor(stream);
3748
4545
  return translateLevel(level);
3749
4546
  }
3750
4547
 
3751
4548
  supportsColor_1 = {
3752
4549
  supportsColor: getSupportLevel,
3753
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
3754
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
4550
+ stdout: getSupportLevel(process.stdout),
4551
+ stderr: getSupportLevel(process.stderr)
3755
4552
  };
3756
4553
  return supportsColor_1;
3757
4554
  }
@@ -3767,7 +4564,7 @@ function requireNode () {
3767
4564
  if (hasRequiredNode) return node.exports;
3768
4565
  hasRequiredNode = 1;
3769
4566
  (function (module, exports) {
3770
- const tty = require$$1__default["default"];
4567
+ const tty = require$$0__default$2["default"];
3771
4568
  const util = require$$0__default["default"];
3772
4569
 
3773
4570
  /**
@@ -11375,7 +12172,7 @@ class Reader$1 {
11375
12172
  reader$1.default = Reader$1;
11376
12173
 
11377
12174
  Object.defineProperty(async$4, "__esModule", { value: true });
11378
- const events_1 = require$$0__default$2["default"];
12175
+ const events_1 = require$$0__default$3["default"];
11379
12176
  const fsScandir$2 = out$2;
11380
12177
  const fastq = queueExports;
11381
12178
  const common$2 = common$4;
@@ -94290,7 +95087,7 @@ var require$$1 = [
94290
95087
  ]
94291
95088
  ];
94292
95089
 
94293
- var punycode = require$$0__default$3["default"];
95090
+ var punycode = require$$0__default$4["default"];
94294
95091
  var mappingTable = require$$1;
94295
95092
 
94296
95093
  var PROCESSING_OPTIONS = {
@@ -94485,7 +95282,7 @@ tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
94485
95282
  urlStateMachine.exports;
94486
95283
 
94487
95284
  (function (module) {
94488
- const punycode = require$$0__default$3["default"];
95285
+ const punycode = require$$0__default$4["default"];
94489
95286
  const tr46$1 = tr46;
94490
95287
 
94491
95288
  const specialSchemes = {
@@ -103041,7 +103838,7 @@ const emptyBitmap = {
103041
103838
  * @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap
103042
103839
  */
103043
103840
 
103044
- class Jimp$1 extends require$$0__default$2["default"] {
103841
+ class Jimp$1 extends require$$0__default$3["default"] {
103045
103842
  // An object representing a bitmap in memory, comprising:
103046
103843
  // - data: a buffer of the bitmap data
103047
103844
  // - width: the width of the image in pixels
@@ -108578,7 +109375,7 @@ syncInflate.exports;
108578
109375
 
108579
109376
  (function (module, exports) {
108580
109377
 
108581
- let assert = require$$0__default$4["default"].ok;
109378
+ let assert = require$$0__default$5["default"].ok;
108582
109379
  let zlib = zlib__default["default"];
108583
109380
  let util = require$$0__default["default"];
108584
109381
 
@@ -129714,7 +130511,7 @@ function requireSax () {
129714
130511
  typeof Buffer.isBuffer === 'function' &&
129715
130512
  Buffer.isBuffer(data)) {
129716
130513
  if (!this._decoder) {
129717
- var SD = require$$1__default$1["default"].StringDecoder;
130514
+ var SD = require$$1__default["default"].StringDecoder;
129718
130515
  this._decoder = new SD('utf8');
129719
130516
  }
129720
130517
  data = this._decoder.write(data);
@@ -131136,7 +131933,7 @@ function requireParser () {
131136
131933
 
131137
131934
  sax = requireSax();
131138
131935
 
131139
- events = require$$0__default$2["default"];
131936
+ events = require$$0__default$3["default"];
131140
131937
 
131141
131938
  bom = requireBom();
131142
131939