vitest 0.8.4 → 0.9.1

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.
@@ -1,12 +1,11 @@
1
- import require$$0, { format as format$1 } from 'util';
2
- import { i as isObject, t as toArray, n as noop, a as index$1, g as getCallLastIndex, s as slash, b as getNames, c as assertTypes, d as c$1 } from './chunk-utils-base.8408f73a.js';
3
- import { g as getWorkerState } from './chunk-utils-global.7bcfa03c.js';
4
- import { s as setTimeout, c as clearTimeout, g as getOriginalPos, p as posToNumber, n as numberToPos, l as lineSplitRE, a as parseStacktrace, u as unifiedDiff } from './chunk-utils-timers.7bdeea22.js';
1
+ import require$$0, { format } from 'util';
2
+ import { g as getWorkerState, i as isObject, t as toArray, n as noop, a as index$1, b as getCallLastIndex, s as slash, c as getNames, d as assertTypes, e as c, r as resetModules } from './chunk-utils-global.10dcdfa6.js';
3
+ import { s as setTimeout, c as clearTimeout, p as plugins_1, f as format_1, g as getOriginalPos, a as posToNumber, n as numberToPos, l as lineSplitRE, b as parseStacktrace, u as unifiedDiff, d as stringify, m as matcherUtils } from './chunk-utils-timers.4800834c.js';
5
4
  import chai$1, { expect as expect$1, util, assert, should } from 'chai';
6
5
  import { c as commonjsRequire, a as commonjsGlobal } from './vendor-_commonjsHelpers.34b404ce.js';
7
- import { r as rpc } from './chunk-runtime-rpc.e8aa1ebe.js';
6
+ import { r as rpc } from './chunk-runtime-rpc.4b80b6bd.js';
8
7
  import fs, { promises } from 'fs';
9
- import { isMockFunction, spyOn, fn, spies } from './jest-mock.js';
8
+ import { isMockFunction, spyOn, fn, spies } from './spy.js';
10
9
 
11
10
  var __defProp$4 = Object.defineProperty;
12
11
  var __defProps$2 = Object.defineProperties;
@@ -111,7 +110,7 @@ function getHooks(key) {
111
110
  }
112
111
 
113
112
  const suite = createSuite();
114
- const test$7 = createTest(function(name, fn, timeout) {
113
+ const test = createTest(function(name, fn, timeout) {
115
114
  getCurrentSuite().test.fn.call(this, name, fn, timeout);
116
115
  });
117
116
  function formatTitle(template, items, idx) {
@@ -119,7 +118,7 @@ function formatTitle(template, items, idx) {
119
118
  template = template.replace(/%%/g, "__vitest_escaped_%__").replace(/%#/g, `${idx}`).replace(/__vitest_escaped_%__/g, "%%");
120
119
  }
121
120
  const count = template.split("%").length - 1;
122
- let formatted = format$1(template, ...items.slice(0, count));
121
+ let formatted = format(template, ...items.slice(0, count));
123
122
  if (isObject(items[0])) {
124
123
  formatted = formatted.replace(/\$([$\w_]+)/g, (_, key) => {
125
124
  return items[0][key];
@@ -128,7 +127,7 @@ function formatTitle(template, items, idx) {
128
127
  return formatted;
129
128
  }
130
129
  const describe = suite;
131
- const it = test$7;
130
+ const it = test;
132
131
  const defaultSuite = suite("");
133
132
  function clearContext() {
134
133
  context.tasks.length = 0;
@@ -458,14 +457,14 @@ function isA(typeName, value) {
458
457
  function isDomNode(obj) {
459
458
  return obj !== null && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string" && typeof obj.isEqualNode === "function";
460
459
  }
461
- const IS_KEYED_SENTINEL$1 = "@@__IMMUTABLE_KEYED__@@";
462
- const IS_SET_SENTINEL$1 = "@@__IMMUTABLE_SET__@@";
463
- const IS_ORDERED_SENTINEL$1 = "@@__IMMUTABLE_ORDERED__@@";
460
+ const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
461
+ const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
462
+ const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
464
463
  function isImmutableUnorderedKeyed(maybeKeyed) {
465
- return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL$1] && !maybeKeyed[IS_ORDERED_SENTINEL$1]);
464
+ return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL] && !maybeKeyed[IS_ORDERED_SENTINEL]);
466
465
  }
467
466
  function isImmutableUnorderedSet(maybeSet) {
468
- return !!(maybeSet && maybeSet[IS_SET_SENTINEL$1] && !maybeSet[IS_ORDERED_SENTINEL$1]);
467
+ return !!(maybeSet && maybeSet[IS_SET_SENTINEL] && !maybeSet[IS_ORDERED_SENTINEL]);
469
468
  }
470
469
  const IteratorSymbol = Symbol.iterator;
471
470
  const hasIterator = (object) => !!(object != null && object[IteratorSymbol]);
@@ -657,2328 +656,26 @@ try {
657
656
 
658
657
  var naturalCompare$1 = naturalCompare$2.exports;
659
658
 
660
- var build = {};
661
-
662
- var ansiStyles = {exports: {}};
663
-
664
- (function (module) {
665
-
666
- const ANSI_BACKGROUND_OFFSET = 10;
667
-
668
- const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
669
-
670
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
671
-
672
- function assembleStyles() {
673
- const codes = new Map();
674
- const styles = {
675
- modifier: {
676
- reset: [0, 0],
677
- // 21 isn't widely supported and 22 does the same thing
678
- bold: [1, 22],
679
- dim: [2, 22],
680
- italic: [3, 23],
681
- underline: [4, 24],
682
- overline: [53, 55],
683
- inverse: [7, 27],
684
- hidden: [8, 28],
685
- strikethrough: [9, 29]
686
- },
687
- color: {
688
- black: [30, 39],
689
- red: [31, 39],
690
- green: [32, 39],
691
- yellow: [33, 39],
692
- blue: [34, 39],
693
- magenta: [35, 39],
694
- cyan: [36, 39],
695
- white: [37, 39],
696
-
697
- // Bright color
698
- blackBright: [90, 39],
699
- redBright: [91, 39],
700
- greenBright: [92, 39],
701
- yellowBright: [93, 39],
702
- blueBright: [94, 39],
703
- magentaBright: [95, 39],
704
- cyanBright: [96, 39],
705
- whiteBright: [97, 39]
706
- },
707
- bgColor: {
708
- bgBlack: [40, 49],
709
- bgRed: [41, 49],
710
- bgGreen: [42, 49],
711
- bgYellow: [43, 49],
712
- bgBlue: [44, 49],
713
- bgMagenta: [45, 49],
714
- bgCyan: [46, 49],
715
- bgWhite: [47, 49],
716
-
717
- // Bright color
718
- bgBlackBright: [100, 49],
719
- bgRedBright: [101, 49],
720
- bgGreenBright: [102, 49],
721
- bgYellowBright: [103, 49],
722
- bgBlueBright: [104, 49],
723
- bgMagentaBright: [105, 49],
724
- bgCyanBright: [106, 49],
725
- bgWhiteBright: [107, 49]
726
- }
727
- };
728
-
729
- // Alias bright black as gray (and grey)
730
- styles.color.gray = styles.color.blackBright;
731
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
732
- styles.color.grey = styles.color.blackBright;
733
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
734
-
735
- for (const [groupName, group] of Object.entries(styles)) {
736
- for (const [styleName, style] of Object.entries(group)) {
737
- styles[styleName] = {
738
- open: `\u001B[${style[0]}m`,
739
- close: `\u001B[${style[1]}m`
740
- };
741
-
742
- group[styleName] = styles[styleName];
743
-
744
- codes.set(style[0], style[1]);
745
- }
746
-
747
- Object.defineProperty(styles, groupName, {
748
- value: group,
749
- enumerable: false
750
- });
751
- }
752
-
753
- Object.defineProperty(styles, 'codes', {
754
- value: codes,
755
- enumerable: false
756
- });
757
-
758
- styles.color.close = '\u001B[39m';
759
- styles.bgColor.close = '\u001B[49m';
760
-
761
- styles.color.ansi256 = wrapAnsi256();
762
- styles.color.ansi16m = wrapAnsi16m();
763
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
764
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
765
-
766
- // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
767
- Object.defineProperties(styles, {
768
- rgbToAnsi256: {
769
- value: (red, green, blue) => {
770
- // We use the extended greyscale palette here, with the exception of
771
- // black and white. normal palette only has 4 greyscale shades.
772
- if (red === green && green === blue) {
773
- if (red < 8) {
774
- return 16;
775
- }
776
-
777
- if (red > 248) {
778
- return 231;
779
- }
780
-
781
- return Math.round(((red - 8) / 247) * 24) + 232;
782
- }
783
-
784
- return 16 +
785
- (36 * Math.round(red / 255 * 5)) +
786
- (6 * Math.round(green / 255 * 5)) +
787
- Math.round(blue / 255 * 5);
788
- },
789
- enumerable: false
790
- },
791
- hexToRgb: {
792
- value: hex => {
793
- const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
794
- if (!matches) {
795
- return [0, 0, 0];
796
- }
797
-
798
- let {colorString} = matches.groups;
799
-
800
- if (colorString.length === 3) {
801
- colorString = colorString.split('').map(character => character + character).join('');
802
- }
803
-
804
- const integer = Number.parseInt(colorString, 16);
805
-
806
- return [
807
- (integer >> 16) & 0xFF,
808
- (integer >> 8) & 0xFF,
809
- integer & 0xFF
810
- ];
811
- },
812
- enumerable: false
813
- },
814
- hexToAnsi256: {
815
- value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
816
- enumerable: false
817
- }
818
- });
819
-
820
- return styles;
821
- }
822
-
823
- // Make the export immutable
824
- Object.defineProperty(module, 'exports', {
825
- enumerable: true,
826
- get: assembleStyles
827
- });
828
- }(ansiStyles));
829
-
830
- var collections = {};
831
-
832
- Object.defineProperty(collections, '__esModule', {
833
- value: true
834
- });
835
- collections.printIteratorEntries = printIteratorEntries;
836
- collections.printIteratorValues = printIteratorValues;
837
- collections.printListItems = printListItems;
838
- collections.printObjectProperties = printObjectProperties;
839
-
840
- /**
841
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
842
- *
843
- * This source code is licensed under the MIT license found in the
844
- * LICENSE file in the root directory of this source tree.
845
- *
846
- */
847
- const getKeysOfEnumerableProperties = (object, compareKeys) => {
848
- const keys = Object.keys(object).sort(compareKeys);
849
-
850
- if (Object.getOwnPropertySymbols) {
851
- Object.getOwnPropertySymbols(object).forEach(symbol => {
852
- if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {
853
- keys.push(symbol);
854
- }
855
- });
856
- }
857
-
858
- return keys;
859
- };
860
- /**
861
- * Return entries (for example, of a map)
862
- * with spacing, indentation, and comma
863
- * without surrounding punctuation (for example, braces)
864
- */
865
-
866
- function printIteratorEntries(
867
- iterator,
868
- config,
869
- indentation,
870
- depth,
871
- refs,
872
- printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '
873
- // What a distracting diff if you change a data structure to/from
874
- // ECMAScript Object or Immutable.Map/OrderedMap which use the default.
875
- separator = ': '
876
- ) {
877
- let result = '';
878
- let current = iterator.next();
879
-
880
- if (!current.done) {
881
- result += config.spacingOuter;
882
- const indentationNext = indentation + config.indent;
883
-
884
- while (!current.done) {
885
- const name = printer(
886
- current.value[0],
887
- config,
888
- indentationNext,
889
- depth,
890
- refs
891
- );
892
- const value = printer(
893
- current.value[1],
894
- config,
895
- indentationNext,
896
- depth,
897
- refs
898
- );
899
- result += indentationNext + name + separator + value;
900
- current = iterator.next();
901
-
902
- if (!current.done) {
903
- result += ',' + config.spacingInner;
904
- } else if (!config.min) {
905
- result += ',';
906
- }
907
- }
908
-
909
- result += config.spacingOuter + indentation;
910
- }
911
-
912
- return result;
913
- }
914
- /**
915
- * Return values (for example, of a set)
916
- * with spacing, indentation, and comma
917
- * without surrounding punctuation (braces or brackets)
918
- */
919
-
920
- function printIteratorValues(
921
- iterator,
922
- config,
923
- indentation,
924
- depth,
925
- refs,
926
- printer
927
- ) {
928
- let result = '';
929
- let current = iterator.next();
930
-
931
- if (!current.done) {
932
- result += config.spacingOuter;
933
- const indentationNext = indentation + config.indent;
934
-
935
- while (!current.done) {
936
- result +=
937
- indentationNext +
938
- printer(current.value, config, indentationNext, depth, refs);
939
- current = iterator.next();
940
-
941
- if (!current.done) {
942
- result += ',' + config.spacingInner;
943
- } else if (!config.min) {
944
- result += ',';
945
- }
946
- }
947
-
948
- result += config.spacingOuter + indentation;
949
- }
950
-
951
- return result;
952
- }
953
- /**
954
- * Return items (for example, of an array)
955
- * with spacing, indentation, and comma
956
- * without surrounding punctuation (for example, brackets)
957
- **/
958
-
959
- function printListItems(list, config, indentation, depth, refs, printer) {
960
- let result = '';
961
-
962
- if (list.length) {
963
- result += config.spacingOuter;
964
- const indentationNext = indentation + config.indent;
965
-
966
- for (let i = 0; i < list.length; i++) {
967
- result += indentationNext;
968
-
969
- if (i in list) {
970
- result += printer(list[i], config, indentationNext, depth, refs);
971
- }
972
-
973
- if (i < list.length - 1) {
974
- result += ',' + config.spacingInner;
975
- } else if (!config.min) {
976
- result += ',';
977
- }
978
- }
979
-
980
- result += config.spacingOuter + indentation;
981
- }
982
-
983
- return result;
984
- }
985
- /**
986
- * Return properties of an object
987
- * with spacing, indentation, and comma
988
- * without surrounding punctuation (for example, braces)
989
- */
990
-
991
- function printObjectProperties(val, config, indentation, depth, refs, printer) {
992
- let result = '';
993
- const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
994
-
995
- if (keys.length) {
996
- result += config.spacingOuter;
997
- const indentationNext = indentation + config.indent;
998
-
999
- for (let i = 0; i < keys.length; i++) {
1000
- const key = keys[i];
1001
- const name = printer(key, config, indentationNext, depth, refs);
1002
- const value = printer(val[key], config, indentationNext, depth, refs);
1003
- result += indentationNext + name + ': ' + value;
1004
-
1005
- if (i < keys.length - 1) {
1006
- result += ',' + config.spacingInner;
1007
- } else if (!config.min) {
1008
- result += ',';
1009
- }
1010
- }
1011
-
1012
- result += config.spacingOuter + indentation;
1013
- }
1014
-
1015
- return result;
1016
- }
1017
-
1018
- var AsymmetricMatcher$3 = {};
1019
-
1020
- Object.defineProperty(AsymmetricMatcher$3, '__esModule', {
1021
- value: true
1022
- });
1023
- AsymmetricMatcher$3.test = AsymmetricMatcher$3.serialize = AsymmetricMatcher$3.default = void 0;
1024
-
1025
- var _collections$3 = collections;
1026
-
1027
- var global$3 = (function () {
1028
- if (typeof globalThis !== 'undefined') {
1029
- return globalThis;
1030
- } else if (typeof global$3 !== 'undefined') {
1031
- return global$3;
1032
- } else if (typeof self !== 'undefined') {
1033
- return self;
1034
- } else if (typeof window !== 'undefined') {
1035
- return window;
1036
- } else {
1037
- return Function('return this')();
1038
- }
1039
- })();
1040
-
1041
- var Symbol$2 = global$3['jest-symbol-do-not-touch'] || global$3.Symbol;
1042
- const asymmetricMatcher =
1043
- typeof Symbol$2 === 'function' && Symbol$2.for
1044
- ? Symbol$2.for('jest.asymmetricMatcher')
1045
- : 0x1357a5;
1046
- const SPACE$2 = ' ';
1047
-
1048
- const serialize$7 = (val, config, indentation, depth, refs, printer) => {
1049
- const stringedValue = val.toString();
1050
-
1051
- if (
1052
- stringedValue === 'ArrayContaining' ||
1053
- stringedValue === 'ArrayNotContaining'
1054
- ) {
1055
- if (++depth > config.maxDepth) {
1056
- return '[' + stringedValue + ']';
1057
- }
1058
-
1059
- return (
1060
- stringedValue +
1061
- SPACE$2 +
1062
- '[' +
1063
- (0, _collections$3.printListItems)(
1064
- val.sample,
1065
- config,
1066
- indentation,
1067
- depth,
1068
- refs,
1069
- printer
1070
- ) +
1071
- ']'
1072
- );
1073
- }
1074
-
1075
- if (
1076
- stringedValue === 'ObjectContaining' ||
1077
- stringedValue === 'ObjectNotContaining'
1078
- ) {
1079
- if (++depth > config.maxDepth) {
1080
- return '[' + stringedValue + ']';
1081
- }
1082
-
1083
- return (
1084
- stringedValue +
1085
- SPACE$2 +
1086
- '{' +
1087
- (0, _collections$3.printObjectProperties)(
1088
- val.sample,
1089
- config,
1090
- indentation,
1091
- depth,
1092
- refs,
1093
- printer
1094
- ) +
1095
- '}'
1096
- );
1097
- }
1098
-
1099
- if (
1100
- stringedValue === 'StringMatching' ||
1101
- stringedValue === 'StringNotMatching'
1102
- ) {
1103
- return (
1104
- stringedValue +
1105
- SPACE$2 +
1106
- printer(val.sample, config, indentation, depth, refs)
1107
- );
1108
- }
1109
-
1110
- if (
1111
- stringedValue === 'StringContaining' ||
1112
- stringedValue === 'StringNotContaining'
1113
- ) {
1114
- return (
1115
- stringedValue +
1116
- SPACE$2 +
1117
- printer(val.sample, config, indentation, depth, refs)
1118
- );
1119
- }
1120
-
1121
- return val.toAsymmetricMatcher();
1122
- };
1123
-
1124
- AsymmetricMatcher$3.serialize = serialize$7;
1125
-
1126
- const test$6 = val => val && val.$$typeof === asymmetricMatcher;
1127
-
1128
- AsymmetricMatcher$3.test = test$6;
1129
- const plugin$6 = {
1130
- serialize: serialize$7,
1131
- test: test$6
1132
- };
1133
- var _default$7 = plugin$6;
1134
- AsymmetricMatcher$3.default = _default$7;
1135
-
1136
- var ConvertAnsi = {};
1137
-
1138
- var ansiRegex = ({onlyFirst = false} = {}) => {
1139
- const pattern = [
1140
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
1141
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
1142
- ].join('|');
1143
-
1144
- return new RegExp(pattern, onlyFirst ? undefined : 'g');
1145
- };
1146
-
1147
- Object.defineProperty(ConvertAnsi, '__esModule', {
1148
- value: true
1149
- });
1150
- ConvertAnsi.test = ConvertAnsi.serialize = ConvertAnsi.default = void 0;
1151
-
1152
- var _ansiRegex = _interopRequireDefault$2(ansiRegex);
1153
-
1154
- var _ansiStyles$1 = _interopRequireDefault$2(ansiStyles.exports);
1155
-
1156
- function _interopRequireDefault$2(obj) {
1157
- return obj && obj.__esModule ? obj : {default: obj};
1158
- }
1159
-
1160
- /**
1161
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1162
- *
1163
- * This source code is licensed under the MIT license found in the
1164
- * LICENSE file in the root directory of this source tree.
1165
- */
1166
- const toHumanReadableAnsi = text =>
1167
- text.replace((0, _ansiRegex.default)(), match => {
1168
- switch (match) {
1169
- case _ansiStyles$1.default.red.close:
1170
- case _ansiStyles$1.default.green.close:
1171
- case _ansiStyles$1.default.cyan.close:
1172
- case _ansiStyles$1.default.gray.close:
1173
- case _ansiStyles$1.default.white.close:
1174
- case _ansiStyles$1.default.yellow.close:
1175
- case _ansiStyles$1.default.bgRed.close:
1176
- case _ansiStyles$1.default.bgGreen.close:
1177
- case _ansiStyles$1.default.bgYellow.close:
1178
- case _ansiStyles$1.default.inverse.close:
1179
- case _ansiStyles$1.default.dim.close:
1180
- case _ansiStyles$1.default.bold.close:
1181
- case _ansiStyles$1.default.reset.open:
1182
- case _ansiStyles$1.default.reset.close:
1183
- return '</>';
1184
-
1185
- case _ansiStyles$1.default.red.open:
1186
- return '<red>';
1187
-
1188
- case _ansiStyles$1.default.green.open:
1189
- return '<green>';
1190
-
1191
- case _ansiStyles$1.default.cyan.open:
1192
- return '<cyan>';
1193
-
1194
- case _ansiStyles$1.default.gray.open:
1195
- return '<gray>';
1196
-
1197
- case _ansiStyles$1.default.white.open:
1198
- return '<white>';
1199
-
1200
- case _ansiStyles$1.default.yellow.open:
1201
- return '<yellow>';
1202
-
1203
- case _ansiStyles$1.default.bgRed.open:
1204
- return '<bgRed>';
1205
-
1206
- case _ansiStyles$1.default.bgGreen.open:
1207
- return '<bgGreen>';
1208
-
1209
- case _ansiStyles$1.default.bgYellow.open:
1210
- return '<bgYellow>';
1211
-
1212
- case _ansiStyles$1.default.inverse.open:
1213
- return '<inverse>';
1214
-
1215
- case _ansiStyles$1.default.dim.open:
1216
- return '<dim>';
1217
-
1218
- case _ansiStyles$1.default.bold.open:
1219
- return '<bold>';
1220
-
1221
- default:
1222
- return '';
1223
- }
1224
- });
1225
-
1226
- const test$5 = val =>
1227
- typeof val === 'string' && !!val.match((0, _ansiRegex.default)());
1228
-
1229
- ConvertAnsi.test = test$5;
1230
-
1231
- const serialize$6 = (val, config, indentation, depth, refs, printer) =>
1232
- printer(toHumanReadableAnsi(val), config, indentation, depth, refs);
1233
-
1234
- ConvertAnsi.serialize = serialize$6;
1235
- const plugin$5 = {
1236
- serialize: serialize$6,
1237
- test: test$5
1238
- };
1239
- var _default$6 = plugin$5;
1240
- ConvertAnsi.default = _default$6;
1241
-
1242
- var DOMCollection$2 = {};
1243
-
1244
- Object.defineProperty(DOMCollection$2, '__esModule', {
1245
- value: true
1246
- });
1247
- DOMCollection$2.test = DOMCollection$2.serialize = DOMCollection$2.default = void 0;
1248
-
1249
- var _collections$2 = collections;
1250
-
1251
- /**
1252
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1253
- *
1254
- * This source code is licensed under the MIT license found in the
1255
- * LICENSE file in the root directory of this source tree.
1256
- */
1257
-
1258
- /* eslint-disable local/ban-types-eventually */
1259
- const SPACE$1 = ' ';
1260
- const OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];
1261
- const ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/;
1262
-
1263
- const testName = name =>
1264
- OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);
1265
-
1266
- const test$4 = val =>
1267
- val &&
1268
- val.constructor &&
1269
- !!val.constructor.name &&
1270
- testName(val.constructor.name);
1271
-
1272
- DOMCollection$2.test = test$4;
1273
-
1274
- const isNamedNodeMap = collection =>
1275
- collection.constructor.name === 'NamedNodeMap';
1276
-
1277
- const serialize$5 = (collection, config, indentation, depth, refs, printer) => {
1278
- const name = collection.constructor.name;
1279
-
1280
- if (++depth > config.maxDepth) {
1281
- return '[' + name + ']';
1282
- }
1283
-
1284
- return (
1285
- (config.min ? '' : name + SPACE$1) +
1286
- (OBJECT_NAMES.indexOf(name) !== -1
1287
- ? '{' +
1288
- (0, _collections$2.printObjectProperties)(
1289
- isNamedNodeMap(collection)
1290
- ? Array.from(collection).reduce((props, attribute) => {
1291
- props[attribute.name] = attribute.value;
1292
- return props;
1293
- }, {})
1294
- : {...collection},
1295
- config,
1296
- indentation,
1297
- depth,
1298
- refs,
1299
- printer
1300
- ) +
1301
- '}'
1302
- : '[' +
1303
- (0, _collections$2.printListItems)(
1304
- Array.from(collection),
1305
- config,
1306
- indentation,
1307
- depth,
1308
- refs,
1309
- printer
1310
- ) +
1311
- ']')
1312
- );
1313
- };
1314
-
1315
- DOMCollection$2.serialize = serialize$5;
1316
- const plugin$4 = {
1317
- serialize: serialize$5,
1318
- test: test$4
1319
- };
1320
- var _default$5 = plugin$4;
1321
- DOMCollection$2.default = _default$5;
1322
-
1323
- var DOMElement$2 = {};
1324
-
1325
- var markup = {};
1326
-
1327
- var escapeHTML$1 = {};
1328
-
1329
- Object.defineProperty(escapeHTML$1, '__esModule', {
1330
- value: true
1331
- });
1332
- escapeHTML$1.default = escapeHTML;
1333
-
1334
- /**
1335
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1336
- *
1337
- * This source code is licensed under the MIT license found in the
1338
- * LICENSE file in the root directory of this source tree.
1339
- */
1340
- function escapeHTML(str) {
1341
- return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');
1342
- }
1343
-
1344
- Object.defineProperty(markup, '__esModule', {
1345
- value: true
1346
- });
1347
- markup.printText =
1348
- markup.printProps =
1349
- markup.printElementAsLeaf =
1350
- markup.printElement =
1351
- markup.printComment =
1352
- markup.printChildren =
1353
- void 0;
1354
-
1355
- var _escapeHTML = _interopRequireDefault$1(escapeHTML$1);
1356
-
1357
- function _interopRequireDefault$1(obj) {
1358
- return obj && obj.__esModule ? obj : {default: obj};
1359
- }
1360
-
1361
- /**
1362
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1363
- *
1364
- * This source code is licensed under the MIT license found in the
1365
- * LICENSE file in the root directory of this source tree.
1366
- */
1367
- // Return empty string if keys is empty.
1368
- const printProps = (keys, props, config, indentation, depth, refs, printer) => {
1369
- const indentationNext = indentation + config.indent;
1370
- const colors = config.colors;
1371
- return keys
1372
- .map(key => {
1373
- const value = props[key];
1374
- let printed = printer(value, config, indentationNext, depth, refs);
1375
-
1376
- if (typeof value !== 'string') {
1377
- if (printed.indexOf('\n') !== -1) {
1378
- printed =
1379
- config.spacingOuter +
1380
- indentationNext +
1381
- printed +
1382
- config.spacingOuter +
1383
- indentation;
1384
- }
1385
-
1386
- printed = '{' + printed + '}';
1387
- }
1388
-
1389
- return (
1390
- config.spacingInner +
1391
- indentation +
1392
- colors.prop.open +
1393
- key +
1394
- colors.prop.close +
1395
- '=' +
1396
- colors.value.open +
1397
- printed +
1398
- colors.value.close
1399
- );
1400
- })
1401
- .join('');
1402
- }; // Return empty string if children is empty.
1403
-
1404
- markup.printProps = printProps;
1405
-
1406
- const printChildren = (children, config, indentation, depth, refs, printer) =>
1407
- children
1408
- .map(
1409
- child =>
1410
- config.spacingOuter +
1411
- indentation +
1412
- (typeof child === 'string'
1413
- ? printText(child, config)
1414
- : printer(child, config, indentation, depth, refs))
1415
- )
1416
- .join('');
1417
-
1418
- markup.printChildren = printChildren;
1419
-
1420
- const printText = (text, config) => {
1421
- const contentColor = config.colors.content;
1422
- return (
1423
- contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close
1424
- );
1425
- };
1426
-
1427
- markup.printText = printText;
1428
-
1429
- const printComment = (comment, config) => {
1430
- const commentColor = config.colors.comment;
1431
- return (
1432
- commentColor.open +
1433
- '<!--' +
1434
- (0, _escapeHTML.default)(comment) +
1435
- '-->' +
1436
- commentColor.close
1437
- );
1438
- }; // Separate the functions to format props, children, and element,
1439
- // so a plugin could override a particular function, if needed.
1440
- // Too bad, so sad: the traditional (but unnecessary) space
1441
- // in a self-closing tagColor requires a second test of printedProps.
1442
-
1443
- markup.printComment = printComment;
1444
-
1445
- const printElement = (
1446
- type,
1447
- printedProps,
1448
- printedChildren,
1449
- config,
1450
- indentation
1451
- ) => {
1452
- const tagColor = config.colors.tag;
1453
- return (
1454
- tagColor.open +
1455
- '<' +
1456
- type +
1457
- (printedProps &&
1458
- tagColor.close +
1459
- printedProps +
1460
- config.spacingOuter +
1461
- indentation +
1462
- tagColor.open) +
1463
- (printedChildren
1464
- ? '>' +
1465
- tagColor.close +
1466
- printedChildren +
1467
- config.spacingOuter +
1468
- indentation +
1469
- tagColor.open +
1470
- '</' +
1471
- type
1472
- : (printedProps && !config.min ? '' : ' ') + '/') +
1473
- '>' +
1474
- tagColor.close
1475
- );
1476
- };
1477
-
1478
- markup.printElement = printElement;
1479
-
1480
- const printElementAsLeaf = (type, config) => {
1481
- const tagColor = config.colors.tag;
1482
- return (
1483
- tagColor.open +
1484
- '<' +
1485
- type +
1486
- tagColor.close +
1487
- ' …' +
1488
- tagColor.open +
1489
- ' />' +
1490
- tagColor.close
1491
- );
1492
- };
1493
-
1494
- markup.printElementAsLeaf = printElementAsLeaf;
1495
-
1496
- Object.defineProperty(DOMElement$2, '__esModule', {
1497
- value: true
1498
- });
1499
- DOMElement$2.test = DOMElement$2.serialize = DOMElement$2.default = void 0;
1500
-
1501
- var _markup$2 = markup;
1502
-
1503
- /**
1504
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1505
- *
1506
- * This source code is licensed under the MIT license found in the
1507
- * LICENSE file in the root directory of this source tree.
1508
- */
1509
- const ELEMENT_NODE = 1;
1510
- const TEXT_NODE = 3;
1511
- const COMMENT_NODE = 8;
1512
- const FRAGMENT_NODE = 11;
1513
- const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
1514
-
1515
- const testHasAttribute = val => {
1516
- try {
1517
- return typeof val.hasAttribute === 'function' && val.hasAttribute('is');
1518
- } catch {
1519
- return false;
1520
- }
1521
- };
1522
-
1523
- const testNode = val => {
1524
- const constructorName = val.constructor.name;
1525
- const {nodeType, tagName} = val;
1526
- const isCustomElement =
1527
- (typeof tagName === 'string' && tagName.includes('-')) ||
1528
- testHasAttribute(val);
1529
- return (
1530
- (nodeType === ELEMENT_NODE &&
1531
- (ELEMENT_REGEXP.test(constructorName) || isCustomElement)) ||
1532
- (nodeType === TEXT_NODE && constructorName === 'Text') ||
1533
- (nodeType === COMMENT_NODE && constructorName === 'Comment') ||
1534
- (nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment')
1535
- );
1536
- };
1537
-
1538
- const test$3 = val => {
1539
- var _val$constructor;
1540
-
1541
- return (
1542
- (val === null || val === void 0
1543
- ? void 0
1544
- : (_val$constructor = val.constructor) === null ||
1545
- _val$constructor === void 0
1546
- ? void 0
1547
- : _val$constructor.name) && testNode(val)
1548
- );
1549
- };
1550
-
1551
- DOMElement$2.test = test$3;
1552
-
1553
- function nodeIsText(node) {
1554
- return node.nodeType === TEXT_NODE;
1555
- }
1556
-
1557
- function nodeIsComment(node) {
1558
- return node.nodeType === COMMENT_NODE;
1559
- }
1560
-
1561
- function nodeIsFragment(node) {
1562
- return node.nodeType === FRAGMENT_NODE;
1563
- }
1564
-
1565
- const serialize$4 = (node, config, indentation, depth, refs, printer) => {
1566
- if (nodeIsText(node)) {
1567
- return (0, _markup$2.printText)(node.data, config);
1568
- }
1569
-
1570
- if (nodeIsComment(node)) {
1571
- return (0, _markup$2.printComment)(node.data, config);
1572
- }
1573
-
1574
- const type = nodeIsFragment(node)
1575
- ? 'DocumentFragment'
1576
- : node.tagName.toLowerCase();
1577
-
1578
- if (++depth > config.maxDepth) {
1579
- return (0, _markup$2.printElementAsLeaf)(type, config);
1580
- }
1581
-
1582
- return (0, _markup$2.printElement)(
1583
- type,
1584
- (0, _markup$2.printProps)(
1585
- nodeIsFragment(node)
1586
- ? []
1587
- : Array.from(node.attributes)
1588
- .map(attr => attr.name)
1589
- .sort(),
1590
- nodeIsFragment(node)
1591
- ? {}
1592
- : Array.from(node.attributes).reduce((props, attribute) => {
1593
- props[attribute.name] = attribute.value;
1594
- return props;
1595
- }, {}),
1596
- config,
1597
- indentation + config.indent,
1598
- depth,
1599
- refs,
1600
- printer
1601
- ),
1602
- (0, _markup$2.printChildren)(
1603
- Array.prototype.slice.call(node.childNodes || node.children),
1604
- config,
1605
- indentation + config.indent,
1606
- depth,
1607
- refs,
1608
- printer
1609
- ),
1610
- config,
1611
- indentation
1612
- );
1613
- };
1614
-
1615
- DOMElement$2.serialize = serialize$4;
1616
- const plugin$3 = {
1617
- serialize: serialize$4,
1618
- test: test$3
1619
- };
1620
- var _default$4 = plugin$3;
1621
- DOMElement$2.default = _default$4;
1622
-
1623
- var Immutable$2 = {};
1624
-
1625
- Object.defineProperty(Immutable$2, '__esModule', {
1626
- value: true
1627
- });
1628
- Immutable$2.test = Immutable$2.serialize = Immutable$2.default = void 0;
1629
-
1630
- var _collections$1 = collections;
1631
-
1632
- /**
1633
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1634
- *
1635
- * This source code is licensed under the MIT license found in the
1636
- * LICENSE file in the root directory of this source tree.
1637
- */
1638
- // SENTINEL constants are from https://github.com/facebook/immutable-js
1639
- const IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
1640
- const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
1641
- const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
1642
- const IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
1643
- const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
1644
- const IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4
1645
-
1646
- const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
1647
- const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
1648
- const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
1649
-
1650
- const getImmutableName = name => 'Immutable.' + name;
1651
-
1652
- const printAsLeaf = name => '[' + name + ']';
1653
-
1654
- const SPACE = ' ';
1655
- const LAZY = '…'; // Seq is lazy if it calls a method like filter
1656
-
1657
- const printImmutableEntries = (
1658
- val,
1659
- config,
1660
- indentation,
1661
- depth,
1662
- refs,
1663
- printer,
1664
- type
1665
- ) =>
1666
- ++depth > config.maxDepth
1667
- ? printAsLeaf(getImmutableName(type))
1668
- : getImmutableName(type) +
1669
- SPACE +
1670
- '{' +
1671
- (0, _collections$1.printIteratorEntries)(
1672
- val.entries(),
1673
- config,
1674
- indentation,
1675
- depth,
1676
- refs,
1677
- printer
1678
- ) +
1679
- '}'; // Record has an entries method because it is a collection in immutable v3.
1680
- // Return an iterator for Immutable Record from version v3 or v4.
1681
-
1682
- function getRecordEntries(val) {
1683
- let i = 0;
1684
- return {
1685
- next() {
1686
- if (i < val._keys.length) {
1687
- const key = val._keys[i++];
1688
- return {
1689
- done: false,
1690
- value: [key, val.get(key)]
1691
- };
1692
- }
1693
-
1694
- return {
1695
- done: true,
1696
- value: undefined
1697
- };
1698
- }
1699
- };
1700
- }
1701
-
1702
- const printImmutableRecord = (
1703
- val,
1704
- config,
1705
- indentation,
1706
- depth,
1707
- refs,
1708
- printer
1709
- ) => {
1710
- // _name property is defined only for an Immutable Record instance
1711
- // which was constructed with a second optional descriptive name arg
1712
- const name = getImmutableName(val._name || 'Record');
1713
- return ++depth > config.maxDepth
1714
- ? printAsLeaf(name)
1715
- : name +
1716
- SPACE +
1717
- '{' +
1718
- (0, _collections$1.printIteratorEntries)(
1719
- getRecordEntries(val),
1720
- config,
1721
- indentation,
1722
- depth,
1723
- refs,
1724
- printer
1725
- ) +
1726
- '}';
1727
- };
1728
-
1729
- const printImmutableSeq = (val, config, indentation, depth, refs, printer) => {
1730
- const name = getImmutableName('Seq');
1731
-
1732
- if (++depth > config.maxDepth) {
1733
- return printAsLeaf(name);
1734
- }
1735
-
1736
- if (val[IS_KEYED_SENTINEL]) {
1737
- return (
1738
- name +
1739
- SPACE +
1740
- '{' + // from Immutable collection of entries or from ECMAScript object
1741
- (val._iter || val._object
1742
- ? (0, _collections$1.printIteratorEntries)(
1743
- val.entries(),
1744
- config,
1745
- indentation,
1746
- depth,
1747
- refs,
1748
- printer
1749
- )
1750
- : LAZY) +
1751
- '}'
1752
- );
1753
- }
1754
-
1755
- return (
1756
- name +
1757
- SPACE +
1758
- '[' +
1759
- (val._iter || // from Immutable collection of values
1760
- val._array || // from ECMAScript array
1761
- val._collection || // from ECMAScript collection in immutable v4
1762
- val._iterable // from ECMAScript collection in immutable v3
1763
- ? (0, _collections$1.printIteratorValues)(
1764
- val.values(),
1765
- config,
1766
- indentation,
1767
- depth,
1768
- refs,
1769
- printer
1770
- )
1771
- : LAZY) +
1772
- ']'
1773
- );
1774
- };
1775
-
1776
- const printImmutableValues = (
1777
- val,
1778
- config,
1779
- indentation,
1780
- depth,
1781
- refs,
1782
- printer,
1783
- type
1784
- ) =>
1785
- ++depth > config.maxDepth
1786
- ? printAsLeaf(getImmutableName(type))
1787
- : getImmutableName(type) +
1788
- SPACE +
1789
- '[' +
1790
- (0, _collections$1.printIteratorValues)(
1791
- val.values(),
1792
- config,
1793
- indentation,
1794
- depth,
1795
- refs,
1796
- printer
1797
- ) +
1798
- ']';
1799
-
1800
- const serialize$3 = (val, config, indentation, depth, refs, printer) => {
1801
- if (val[IS_MAP_SENTINEL]) {
1802
- return printImmutableEntries(
1803
- val,
1804
- config,
1805
- indentation,
1806
- depth,
1807
- refs,
1808
- printer,
1809
- val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'
1810
- );
1811
- }
1812
-
1813
- if (val[IS_LIST_SENTINEL]) {
1814
- return printImmutableValues(
1815
- val,
1816
- config,
1817
- indentation,
1818
- depth,
1819
- refs,
1820
- printer,
1821
- 'List'
1822
- );
1823
- }
1824
-
1825
- if (val[IS_SET_SENTINEL]) {
1826
- return printImmutableValues(
1827
- val,
1828
- config,
1829
- indentation,
1830
- depth,
1831
- refs,
1832
- printer,
1833
- val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'
1834
- );
1835
- }
1836
-
1837
- if (val[IS_STACK_SENTINEL]) {
1838
- return printImmutableValues(
1839
- val,
1840
- config,
1841
- indentation,
1842
- depth,
1843
- refs,
1844
- printer,
1845
- 'Stack'
1846
- );
1847
- }
1848
-
1849
- if (val[IS_SEQ_SENTINEL]) {
1850
- return printImmutableSeq(val, config, indentation, depth, refs, printer);
1851
- } // For compatibility with immutable v3 and v4, let record be the default.
1852
-
1853
- return printImmutableRecord(val, config, indentation, depth, refs, printer);
1854
- }; // Explicitly comparing sentinel properties to true avoids false positive
1855
- // when mock identity-obj-proxy returns the key as the value for any key.
1856
-
1857
- Immutable$2.serialize = serialize$3;
1858
-
1859
- const test$2 = val =>
1860
- val &&
1861
- (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
1862
-
1863
- Immutable$2.test = test$2;
1864
- const plugin$2 = {
1865
- serialize: serialize$3,
1866
- test: test$2
1867
- };
1868
- var _default$3 = plugin$2;
1869
- Immutable$2.default = _default$3;
1870
-
1871
- var ReactElement$2 = {};
1872
-
1873
- var reactIs = {exports: {}};
1874
-
1875
- var reactIs_production_min = {};
1876
-
1877
- /** @license React v17.0.2
1878
- * react-is.production.min.js
1879
- *
1880
- * Copyright (c) Facebook, Inc. and its affiliates.
1881
- *
1882
- * This source code is licensed under the MIT license found in the
1883
- * LICENSE file in the root directory of this source tree.
1884
- */
1885
- var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
1886
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
1887
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
1888
- reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
1889
- reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
1890
- reactIs_production_min.typeOf=y;
1891
-
1892
- var reactIs_development = {};
1893
-
1894
- /** @license React v17.0.2
1895
- * react-is.development.js
1896
- *
1897
- * Copyright (c) Facebook, Inc. and its affiliates.
1898
- *
1899
- * This source code is licensed under the MIT license found in the
1900
- * LICENSE file in the root directory of this source tree.
1901
- */
1902
-
1903
- if (process.env.NODE_ENV !== "production") {
1904
- (function() {
1905
-
1906
- // ATTENTION
1907
- // When adding new symbols to this file,
1908
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1909
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1910
- // nor polyfill, then a plain number is used for performance.
1911
- var REACT_ELEMENT_TYPE = 0xeac7;
1912
- var REACT_PORTAL_TYPE = 0xeaca;
1913
- var REACT_FRAGMENT_TYPE = 0xeacb;
1914
- var REACT_STRICT_MODE_TYPE = 0xeacc;
1915
- var REACT_PROFILER_TYPE = 0xead2;
1916
- var REACT_PROVIDER_TYPE = 0xeacd;
1917
- var REACT_CONTEXT_TYPE = 0xeace;
1918
- var REACT_FORWARD_REF_TYPE = 0xead0;
1919
- var REACT_SUSPENSE_TYPE = 0xead1;
1920
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
1921
- var REACT_MEMO_TYPE = 0xead3;
1922
- var REACT_LAZY_TYPE = 0xead4;
1923
- var REACT_BLOCK_TYPE = 0xead9;
1924
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
1925
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
1926
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
1927
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
1928
-
1929
- if (typeof Symbol === 'function' && Symbol.for) {
1930
- var symbolFor = Symbol.for;
1931
- REACT_ELEMENT_TYPE = symbolFor('react.element');
1932
- REACT_PORTAL_TYPE = symbolFor('react.portal');
1933
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
1934
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
1935
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
1936
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
1937
- REACT_CONTEXT_TYPE = symbolFor('react.context');
1938
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
1939
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
1940
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
1941
- REACT_MEMO_TYPE = symbolFor('react.memo');
1942
- REACT_LAZY_TYPE = symbolFor('react.lazy');
1943
- REACT_BLOCK_TYPE = symbolFor('react.block');
1944
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
1945
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
1946
- symbolFor('react.scope');
1947
- symbolFor('react.opaque.id');
1948
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
1949
- symbolFor('react.offscreen');
1950
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
1951
- }
1952
-
1953
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1954
-
1955
- var enableScopeAPI = false; // Experimental Create Event Handle API.
1956
-
1957
- function isValidElementType(type) {
1958
- if (typeof type === 'string' || typeof type === 'function') {
1959
- return true;
1960
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1961
-
1962
-
1963
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
1964
- return true;
1965
- }
1966
-
1967
- if (typeof type === 'object' && type !== null) {
1968
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
1969
- return true;
1970
- }
1971
- }
1972
-
1973
- return false;
1974
- }
1975
-
1976
- function typeOf(object) {
1977
- if (typeof object === 'object' && object !== null) {
1978
- var $$typeof = object.$$typeof;
1979
-
1980
- switch ($$typeof) {
1981
- case REACT_ELEMENT_TYPE:
1982
- var type = object.type;
1983
-
1984
- switch (type) {
1985
- case REACT_FRAGMENT_TYPE:
1986
- case REACT_PROFILER_TYPE:
1987
- case REACT_STRICT_MODE_TYPE:
1988
- case REACT_SUSPENSE_TYPE:
1989
- case REACT_SUSPENSE_LIST_TYPE:
1990
- return type;
1991
-
1992
- default:
1993
- var $$typeofType = type && type.$$typeof;
1994
-
1995
- switch ($$typeofType) {
1996
- case REACT_CONTEXT_TYPE:
1997
- case REACT_FORWARD_REF_TYPE:
1998
- case REACT_LAZY_TYPE:
1999
- case REACT_MEMO_TYPE:
2000
- case REACT_PROVIDER_TYPE:
2001
- return $$typeofType;
2002
-
2003
- default:
2004
- return $$typeof;
2005
- }
2006
-
2007
- }
2008
-
2009
- case REACT_PORTAL_TYPE:
2010
- return $$typeof;
2011
- }
2012
- }
2013
-
2014
- return undefined;
2015
- }
2016
- var ContextConsumer = REACT_CONTEXT_TYPE;
2017
- var ContextProvider = REACT_PROVIDER_TYPE;
2018
- var Element = REACT_ELEMENT_TYPE;
2019
- var ForwardRef = REACT_FORWARD_REF_TYPE;
2020
- var Fragment = REACT_FRAGMENT_TYPE;
2021
- var Lazy = REACT_LAZY_TYPE;
2022
- var Memo = REACT_MEMO_TYPE;
2023
- var Portal = REACT_PORTAL_TYPE;
2024
- var Profiler = REACT_PROFILER_TYPE;
2025
- var StrictMode = REACT_STRICT_MODE_TYPE;
2026
- var Suspense = REACT_SUSPENSE_TYPE;
2027
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
2028
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
2029
-
2030
- function isAsyncMode(object) {
2031
- {
2032
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
2033
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
2034
-
2035
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
2036
- }
2037
- }
2038
-
2039
- return false;
2040
- }
2041
- function isConcurrentMode(object) {
2042
- {
2043
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
2044
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
2045
-
2046
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
2047
- }
2048
- }
2049
-
2050
- return false;
2051
- }
2052
- function isContextConsumer(object) {
2053
- return typeOf(object) === REACT_CONTEXT_TYPE;
2054
- }
2055
- function isContextProvider(object) {
2056
- return typeOf(object) === REACT_PROVIDER_TYPE;
2057
- }
2058
- function isElement(object) {
2059
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2060
- }
2061
- function isForwardRef(object) {
2062
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
2063
- }
2064
- function isFragment(object) {
2065
- return typeOf(object) === REACT_FRAGMENT_TYPE;
2066
- }
2067
- function isLazy(object) {
2068
- return typeOf(object) === REACT_LAZY_TYPE;
2069
- }
2070
- function isMemo(object) {
2071
- return typeOf(object) === REACT_MEMO_TYPE;
2072
- }
2073
- function isPortal(object) {
2074
- return typeOf(object) === REACT_PORTAL_TYPE;
2075
- }
2076
- function isProfiler(object) {
2077
- return typeOf(object) === REACT_PROFILER_TYPE;
2078
- }
2079
- function isStrictMode(object) {
2080
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
2081
- }
2082
- function isSuspense(object) {
2083
- return typeOf(object) === REACT_SUSPENSE_TYPE;
2084
- }
2085
-
2086
- reactIs_development.ContextConsumer = ContextConsumer;
2087
- reactIs_development.ContextProvider = ContextProvider;
2088
- reactIs_development.Element = Element;
2089
- reactIs_development.ForwardRef = ForwardRef;
2090
- reactIs_development.Fragment = Fragment;
2091
- reactIs_development.Lazy = Lazy;
2092
- reactIs_development.Memo = Memo;
2093
- reactIs_development.Portal = Portal;
2094
- reactIs_development.Profiler = Profiler;
2095
- reactIs_development.StrictMode = StrictMode;
2096
- reactIs_development.Suspense = Suspense;
2097
- reactIs_development.isAsyncMode = isAsyncMode;
2098
- reactIs_development.isConcurrentMode = isConcurrentMode;
2099
- reactIs_development.isContextConsumer = isContextConsumer;
2100
- reactIs_development.isContextProvider = isContextProvider;
2101
- reactIs_development.isElement = isElement;
2102
- reactIs_development.isForwardRef = isForwardRef;
2103
- reactIs_development.isFragment = isFragment;
2104
- reactIs_development.isLazy = isLazy;
2105
- reactIs_development.isMemo = isMemo;
2106
- reactIs_development.isPortal = isPortal;
2107
- reactIs_development.isProfiler = isProfiler;
2108
- reactIs_development.isStrictMode = isStrictMode;
2109
- reactIs_development.isSuspense = isSuspense;
2110
- reactIs_development.isValidElementType = isValidElementType;
2111
- reactIs_development.typeOf = typeOf;
2112
- })();
2113
- }
2114
-
2115
- if (process.env.NODE_ENV === 'production') {
2116
- reactIs.exports = reactIs_production_min;
2117
- } else {
2118
- reactIs.exports = reactIs_development;
2119
- }
2120
-
2121
- Object.defineProperty(ReactElement$2, '__esModule', {
2122
- value: true
2123
- });
2124
- ReactElement$2.test = ReactElement$2.serialize = ReactElement$2.default = void 0;
2125
-
2126
- var ReactIs = _interopRequireWildcard(reactIs.exports);
2127
-
2128
- var _markup$1 = markup;
2129
-
2130
- function _getRequireWildcardCache(nodeInterop) {
2131
- if (typeof WeakMap !== 'function') return null;
2132
- var cacheBabelInterop = new WeakMap();
2133
- var cacheNodeInterop = new WeakMap();
2134
- return (_getRequireWildcardCache = function (nodeInterop) {
2135
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
2136
- })(nodeInterop);
2137
- }
2138
-
2139
- function _interopRequireWildcard(obj, nodeInterop) {
2140
- if (!nodeInterop && obj && obj.__esModule) {
2141
- return obj;
2142
- }
2143
- if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
2144
- return {default: obj};
2145
- }
2146
- var cache = _getRequireWildcardCache(nodeInterop);
2147
- if (cache && cache.has(obj)) {
2148
- return cache.get(obj);
2149
- }
2150
- var newObj = {};
2151
- var hasPropertyDescriptor =
2152
- Object.defineProperty && Object.getOwnPropertyDescriptor;
2153
- for (var key in obj) {
2154
- if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
2155
- var desc = hasPropertyDescriptor
2156
- ? Object.getOwnPropertyDescriptor(obj, key)
2157
- : null;
2158
- if (desc && (desc.get || desc.set)) {
2159
- Object.defineProperty(newObj, key, desc);
2160
- } else {
2161
- newObj[key] = obj[key];
2162
- }
2163
- }
2164
- }
2165
- newObj.default = obj;
2166
- if (cache) {
2167
- cache.set(obj, newObj);
2168
- }
2169
- return newObj;
2170
- }
2171
-
2172
- /**
2173
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
2174
- *
2175
- * This source code is licensed under the MIT license found in the
2176
- * LICENSE file in the root directory of this source tree.
2177
- */
2178
- // Given element.props.children, or subtree during recursive traversal,
2179
- // return flattened array of children.
2180
- const getChildren = (arg, children = []) => {
2181
- if (Array.isArray(arg)) {
2182
- arg.forEach(item => {
2183
- getChildren(item, children);
2184
- });
2185
- } else if (arg != null && arg !== false) {
2186
- children.push(arg);
2187
- }
2188
-
2189
- return children;
2190
- };
2191
-
2192
- const getType = element => {
2193
- const type = element.type;
2194
-
2195
- if (typeof type === 'string') {
2196
- return type;
2197
- }
2198
-
2199
- if (typeof type === 'function') {
2200
- return type.displayName || type.name || 'Unknown';
2201
- }
2202
-
2203
- if (ReactIs.isFragment(element)) {
2204
- return 'React.Fragment';
2205
- }
2206
-
2207
- if (ReactIs.isSuspense(element)) {
2208
- return 'React.Suspense';
2209
- }
2210
-
2211
- if (typeof type === 'object' && type !== null) {
2212
- if (ReactIs.isContextProvider(element)) {
2213
- return 'Context.Provider';
2214
- }
2215
-
2216
- if (ReactIs.isContextConsumer(element)) {
2217
- return 'Context.Consumer';
2218
- }
2219
-
2220
- if (ReactIs.isForwardRef(element)) {
2221
- if (type.displayName) {
2222
- return type.displayName;
2223
- }
2224
-
2225
- const functionName = type.render.displayName || type.render.name || '';
2226
- return functionName !== ''
2227
- ? 'ForwardRef(' + functionName + ')'
2228
- : 'ForwardRef';
2229
- }
2230
-
2231
- if (ReactIs.isMemo(element)) {
2232
- const functionName =
2233
- type.displayName || type.type.displayName || type.type.name || '';
2234
- return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';
2235
- }
2236
- }
2237
-
2238
- return 'UNDEFINED';
2239
- };
2240
-
2241
- const getPropKeys$1 = element => {
2242
- const {props} = element;
2243
- return Object.keys(props)
2244
- .filter(key => key !== 'children' && props[key] !== undefined)
2245
- .sort();
2246
- };
2247
-
2248
- const serialize$2 = (element, config, indentation, depth, refs, printer) =>
2249
- ++depth > config.maxDepth
2250
- ? (0, _markup$1.printElementAsLeaf)(getType(element), config)
2251
- : (0, _markup$1.printElement)(
2252
- getType(element),
2253
- (0, _markup$1.printProps)(
2254
- getPropKeys$1(element),
2255
- element.props,
2256
- config,
2257
- indentation + config.indent,
2258
- depth,
2259
- refs,
2260
- printer
2261
- ),
2262
- (0, _markup$1.printChildren)(
2263
- getChildren(element.props.children),
2264
- config,
2265
- indentation + config.indent,
2266
- depth,
2267
- refs,
2268
- printer
2269
- ),
2270
- config,
2271
- indentation
2272
- );
2273
-
2274
- ReactElement$2.serialize = serialize$2;
2275
-
2276
- const test$1 = val => val != null && ReactIs.isElement(val);
2277
-
2278
- ReactElement$2.test = test$1;
2279
- const plugin$1 = {
2280
- serialize: serialize$2,
2281
- test: test$1
2282
- };
2283
- var _default$2 = plugin$1;
2284
- ReactElement$2.default = _default$2;
2285
-
2286
- var ReactTestComponent$2 = {};
2287
-
2288
- Object.defineProperty(ReactTestComponent$2, '__esModule', {
2289
- value: true
2290
- });
2291
- ReactTestComponent$2.test = ReactTestComponent$2.serialize = ReactTestComponent$2.default = void 0;
2292
-
2293
- var _markup = markup;
2294
-
2295
- var global$2 = (function () {
2296
- if (typeof globalThis !== 'undefined') {
2297
- return globalThis;
2298
- } else if (typeof global$2 !== 'undefined') {
2299
- return global$2;
2300
- } else if (typeof self !== 'undefined') {
2301
- return self;
2302
- } else if (typeof window !== 'undefined') {
2303
- return window;
2304
- } else {
2305
- return Function('return this')();
2306
- }
2307
- })();
2308
-
2309
- var Symbol$1 = global$2['jest-symbol-do-not-touch'] || global$2.Symbol;
2310
- const testSymbol =
2311
- typeof Symbol$1 === 'function' && Symbol$1.for
2312
- ? Symbol$1.for('react.test.json')
2313
- : 0xea71357;
2314
-
2315
- const getPropKeys = object => {
2316
- const {props} = object;
2317
- return props
2318
- ? Object.keys(props)
2319
- .filter(key => props[key] !== undefined)
2320
- .sort()
2321
- : [];
2322
- };
2323
-
2324
- const serialize$1 = (object, config, indentation, depth, refs, printer) =>
2325
- ++depth > config.maxDepth
2326
- ? (0, _markup.printElementAsLeaf)(object.type, config)
2327
- : (0, _markup.printElement)(
2328
- object.type,
2329
- object.props
2330
- ? (0, _markup.printProps)(
2331
- getPropKeys(object),
2332
- object.props,
2333
- config,
2334
- indentation + config.indent,
2335
- depth,
2336
- refs,
2337
- printer
2338
- )
2339
- : '',
2340
- object.children
2341
- ? (0, _markup.printChildren)(
2342
- object.children,
2343
- config,
2344
- indentation + config.indent,
2345
- depth,
2346
- refs,
2347
- printer
2348
- )
2349
- : '',
2350
- config,
2351
- indentation
2352
- );
2353
-
2354
- ReactTestComponent$2.serialize = serialize$1;
2355
-
2356
- const test = val => val && val.$$typeof === testSymbol;
2357
-
2358
- ReactTestComponent$2.test = test;
2359
- const plugin = {
2360
- serialize: serialize$1,
2361
- test
2362
- };
2363
- var _default$1 = plugin;
2364
- ReactTestComponent$2.default = _default$1;
2365
-
2366
- Object.defineProperty(build, '__esModule', {
2367
- value: true
2368
- });
2369
- build.default = build.DEFAULT_OPTIONS = void 0;
2370
- var format_1 = build.format = format;
2371
- var plugins_1 = build.plugins = void 0;
2372
-
2373
- var _ansiStyles = _interopRequireDefault(ansiStyles.exports);
2374
-
2375
- var _collections = collections;
2376
-
2377
- var _AsymmetricMatcher = _interopRequireDefault(
2378
- AsymmetricMatcher$3
2379
- );
2380
-
2381
- var _ConvertAnsi = _interopRequireDefault(ConvertAnsi);
2382
-
2383
- var _DOMCollection = _interopRequireDefault(DOMCollection$2);
2384
-
2385
- var _DOMElement = _interopRequireDefault(DOMElement$2);
2386
-
2387
- var _Immutable = _interopRequireDefault(Immutable$2);
2388
-
2389
- var _ReactElement = _interopRequireDefault(ReactElement$2);
2390
-
2391
- var _ReactTestComponent = _interopRequireDefault(
2392
- ReactTestComponent$2
2393
- );
2394
-
2395
- function _interopRequireDefault(obj) {
2396
- return obj && obj.__esModule ? obj : {default: obj};
2397
- }
2398
-
2399
- /**
2400
- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
2401
- *
2402
- * This source code is licensed under the MIT license found in the
2403
- * LICENSE file in the root directory of this source tree.
2404
- */
2405
-
2406
- /* eslint-disable local/ban-types-eventually */
2407
- const toString = Object.prototype.toString;
2408
- const toISOString = Date.prototype.toISOString;
2409
- const errorToString = Error.prototype.toString;
2410
- const regExpToString = RegExp.prototype.toString;
2411
- /**
2412
- * Explicitly comparing typeof constructor to function avoids undefined as name
2413
- * when mock identity-obj-proxy returns the key as the value for any key.
2414
- */
2415
-
2416
- const getConstructorName = val =>
2417
- (typeof val.constructor === 'function' && val.constructor.name) || 'Object';
2418
- /* global window */
2419
-
2420
- /** Is val is equal to global window object? Works even if it does not exist :) */
2421
-
2422
- const isWindow = val => typeof window !== 'undefined' && val === window;
2423
-
2424
- const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
2425
- const NEWLINE_REGEXP = /\n/gi;
2426
-
2427
- class PrettyFormatPluginError extends Error {
2428
- constructor(message, stack) {
2429
- super(message);
2430
- this.stack = stack;
2431
- this.name = this.constructor.name;
2432
- }
2433
- }
2434
-
2435
- function isToStringedArrayType(toStringed) {
2436
- return (
2437
- toStringed === '[object Array]' ||
2438
- toStringed === '[object ArrayBuffer]' ||
2439
- toStringed === '[object DataView]' ||
2440
- toStringed === '[object Float32Array]' ||
2441
- toStringed === '[object Float64Array]' ||
2442
- toStringed === '[object Int8Array]' ||
2443
- toStringed === '[object Int16Array]' ||
2444
- toStringed === '[object Int32Array]' ||
2445
- toStringed === '[object Uint8Array]' ||
2446
- toStringed === '[object Uint8ClampedArray]' ||
2447
- toStringed === '[object Uint16Array]' ||
2448
- toStringed === '[object Uint32Array]'
2449
- );
2450
- }
2451
-
2452
- function printNumber(val) {
2453
- return Object.is(val, -0) ? '-0' : String(val);
2454
- }
2455
-
2456
- function printBigInt(val) {
2457
- return String(`${val}n`);
2458
- }
2459
-
2460
- function printFunction(val, printFunctionName) {
2461
- if (!printFunctionName) {
2462
- return '[Function]';
2463
- }
2464
-
2465
- return '[Function ' + (val.name || 'anonymous') + ']';
2466
- }
2467
-
2468
- function printSymbol(val) {
2469
- return String(val).replace(SYMBOL_REGEXP, 'Symbol($1)');
2470
- }
2471
-
2472
- function printError(val) {
2473
- return '[' + errorToString.call(val) + ']';
2474
- }
2475
- /**
2476
- * The first port of call for printing an object, handles most of the
2477
- * data-types in JS.
2478
- */
2479
-
2480
- function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
2481
- if (val === true || val === false) {
2482
- return '' + val;
2483
- }
2484
-
2485
- if (val === undefined) {
2486
- return 'undefined';
2487
- }
2488
-
2489
- if (val === null) {
2490
- return 'null';
2491
- }
2492
-
2493
- const typeOf = typeof val;
2494
-
2495
- if (typeOf === 'number') {
2496
- return printNumber(val);
2497
- }
2498
-
2499
- if (typeOf === 'bigint') {
2500
- return printBigInt(val);
2501
- }
2502
-
2503
- if (typeOf === 'string') {
2504
- if (escapeString) {
2505
- return '"' + val.replace(/"|\\/g, '\\$&') + '"';
2506
- }
2507
-
2508
- return '"' + val + '"';
2509
- }
2510
-
2511
- if (typeOf === 'function') {
2512
- return printFunction(val, printFunctionName);
2513
- }
2514
-
2515
- if (typeOf === 'symbol') {
2516
- return printSymbol(val);
2517
- }
2518
-
2519
- const toStringed = toString.call(val);
2520
-
2521
- if (toStringed === '[object WeakMap]') {
2522
- return 'WeakMap {}';
2523
- }
2524
-
2525
- if (toStringed === '[object WeakSet]') {
2526
- return 'WeakSet {}';
2527
- }
2528
-
2529
- if (
2530
- toStringed === '[object Function]' ||
2531
- toStringed === '[object GeneratorFunction]'
2532
- ) {
2533
- return printFunction(val, printFunctionName);
2534
- }
2535
-
2536
- if (toStringed === '[object Symbol]') {
2537
- return printSymbol(val);
2538
- }
2539
-
2540
- if (toStringed === '[object Date]') {
2541
- return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);
2542
- }
2543
-
2544
- if (toStringed === '[object Error]') {
2545
- return printError(val);
2546
- }
2547
-
2548
- if (toStringed === '[object RegExp]') {
2549
- if (escapeRegex) {
2550
- // https://github.com/benjamingr/RegExp.escape/blob/main/polyfill.js
2551
- return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
2552
- }
2553
-
2554
- return regExpToString.call(val);
2555
- }
2556
-
2557
- if (val instanceof Error) {
2558
- return printError(val);
2559
- }
2560
-
2561
- return null;
2562
- }
2563
- /**
2564
- * Handles more complex objects ( such as objects with circular references.
2565
- * maps and sets etc )
2566
- */
2567
-
2568
- function printComplexValue(
2569
- val,
2570
- config,
2571
- indentation,
2572
- depth,
2573
- refs,
2574
- hasCalledToJSON
2575
- ) {
2576
- if (refs.indexOf(val) !== -1) {
2577
- return '[Circular]';
2578
- }
2579
-
2580
- refs = refs.slice();
2581
- refs.push(val);
2582
- const hitMaxDepth = ++depth > config.maxDepth;
2583
- const min = config.min;
2584
-
2585
- if (
2586
- config.callToJSON &&
2587
- !hitMaxDepth &&
2588
- val.toJSON &&
2589
- typeof val.toJSON === 'function' &&
2590
- !hasCalledToJSON
2591
- ) {
2592
- return printer(val.toJSON(), config, indentation, depth, refs, true);
2593
- }
2594
-
2595
- const toStringed = toString.call(val);
2596
-
2597
- if (toStringed === '[object Arguments]') {
2598
- return hitMaxDepth
2599
- ? '[Arguments]'
2600
- : (min ? '' : 'Arguments ') +
2601
- '[' +
2602
- (0, _collections.printListItems)(
2603
- val,
2604
- config,
2605
- indentation,
2606
- depth,
2607
- refs,
2608
- printer
2609
- ) +
2610
- ']';
2611
- }
2612
-
2613
- if (isToStringedArrayType(toStringed)) {
2614
- return hitMaxDepth
2615
- ? '[' + val.constructor.name + ']'
2616
- : (min
2617
- ? ''
2618
- : !config.printBasicPrototype && val.constructor.name === 'Array'
2619
- ? ''
2620
- : val.constructor.name + ' ') +
2621
- '[' +
2622
- (0, _collections.printListItems)(
2623
- val,
2624
- config,
2625
- indentation,
2626
- depth,
2627
- refs,
2628
- printer
2629
- ) +
2630
- ']';
2631
- }
2632
-
2633
- if (toStringed === '[object Map]') {
2634
- return hitMaxDepth
2635
- ? '[Map]'
2636
- : 'Map {' +
2637
- (0, _collections.printIteratorEntries)(
2638
- val.entries(),
2639
- config,
2640
- indentation,
2641
- depth,
2642
- refs,
2643
- printer,
2644
- ' => '
2645
- ) +
2646
- '}';
2647
- }
2648
-
2649
- if (toStringed === '[object Set]') {
2650
- return hitMaxDepth
2651
- ? '[Set]'
2652
- : 'Set {' +
2653
- (0, _collections.printIteratorValues)(
2654
- val.values(),
2655
- config,
2656
- indentation,
2657
- depth,
2658
- refs,
2659
- printer
2660
- ) +
2661
- '}';
2662
- } // Avoid failure to serialize global window object in jsdom test environment.
2663
- // For example, not even relevant if window is prop of React element.
2664
-
2665
- return hitMaxDepth || isWindow(val)
2666
- ? '[' + getConstructorName(val) + ']'
2667
- : (min
2668
- ? ''
2669
- : !config.printBasicPrototype && getConstructorName(val) === 'Object'
2670
- ? ''
2671
- : getConstructorName(val) + ' ') +
2672
- '{' +
2673
- (0, _collections.printObjectProperties)(
2674
- val,
2675
- config,
2676
- indentation,
2677
- depth,
2678
- refs,
2679
- printer
2680
- ) +
2681
- '}';
2682
- }
2683
-
2684
- function isNewPlugin(plugin) {
2685
- return plugin.serialize != null;
2686
- }
2687
-
2688
- function printPlugin(plugin, val, config, indentation, depth, refs) {
2689
- let printed;
2690
-
2691
- try {
2692
- printed = isNewPlugin(plugin)
2693
- ? plugin.serialize(val, config, indentation, depth, refs, printer)
2694
- : plugin.print(
2695
- val,
2696
- valChild => printer(valChild, config, indentation, depth, refs),
2697
- str => {
2698
- const indentationNext = indentation + config.indent;
2699
- return (
2700
- indentationNext +
2701
- str.replace(NEWLINE_REGEXP, '\n' + indentationNext)
2702
- );
2703
- },
2704
- {
2705
- edgeSpacing: config.spacingOuter,
2706
- min: config.min,
2707
- spacing: config.spacingInner
2708
- },
2709
- config.colors
2710
- );
2711
- } catch (error) {
2712
- throw new PrettyFormatPluginError(error.message, error.stack);
2713
- }
2714
-
2715
- if (typeof printed !== 'string') {
2716
- throw new Error(
2717
- `pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`
2718
- );
2719
- }
2720
-
2721
- return printed;
2722
- }
2723
-
2724
- function findPlugin(plugins, val) {
2725
- for (let p = 0; p < plugins.length; p++) {
2726
- try {
2727
- if (plugins[p].test(val)) {
2728
- return plugins[p];
2729
- }
2730
- } catch (error) {
2731
- throw new PrettyFormatPluginError(error.message, error.stack);
2732
- }
2733
- }
2734
-
2735
- return null;
2736
- }
2737
-
2738
- function printer(val, config, indentation, depth, refs, hasCalledToJSON) {
2739
- const plugin = findPlugin(config.plugins, val);
2740
-
2741
- if (plugin !== null) {
2742
- return printPlugin(plugin, val, config, indentation, depth, refs);
2743
- }
2744
-
2745
- const basicResult = printBasicValue(
2746
- val,
2747
- config.printFunctionName,
2748
- config.escapeRegex,
2749
- config.escapeString
2750
- );
2751
-
2752
- if (basicResult !== null) {
2753
- return basicResult;
2754
- }
2755
-
2756
- return printComplexValue(
2757
- val,
2758
- config,
2759
- indentation,
2760
- depth,
2761
- refs,
2762
- hasCalledToJSON
2763
- );
2764
- }
2765
-
2766
- const DEFAULT_THEME = {
2767
- comment: 'gray',
2768
- content: 'reset',
2769
- prop: 'yellow',
2770
- tag: 'cyan',
2771
- value: 'green'
2772
- };
2773
- const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);
2774
- const DEFAULT_OPTIONS = {
2775
- callToJSON: true,
2776
- compareKeys: undefined,
2777
- escapeRegex: false,
2778
- escapeString: true,
2779
- highlight: false,
2780
- indent: 2,
2781
- maxDepth: Infinity,
2782
- min: false,
2783
- plugins: [],
2784
- printBasicPrototype: true,
2785
- printFunctionName: true,
2786
- theme: DEFAULT_THEME
2787
- };
2788
- build.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
2789
-
2790
- function validateOptions(options) {
2791
- Object.keys(options).forEach(key => {
2792
- if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {
2793
- throw new Error(`pretty-format: Unknown option "${key}".`);
2794
- }
2795
- });
2796
-
2797
- if (options.min && options.indent !== undefined && options.indent !== 0) {
2798
- throw new Error(
2799
- 'pretty-format: Options "min" and "indent" cannot be used together.'
2800
- );
2801
- }
2802
-
2803
- if (options.theme !== undefined) {
2804
- if (options.theme === null) {
2805
- throw new Error('pretty-format: Option "theme" must not be null.');
2806
- }
2807
-
2808
- if (typeof options.theme !== 'object') {
2809
- throw new Error(
2810
- `pretty-format: Option "theme" must be of type "object" but instead received "${typeof options.theme}".`
2811
- );
2812
- }
2813
- }
2814
- }
2815
-
2816
- const getColorsHighlight = options =>
2817
- DEFAULT_THEME_KEYS.reduce((colors, key) => {
2818
- const value =
2819
- options.theme && options.theme[key] !== undefined
2820
- ? options.theme[key]
2821
- : DEFAULT_THEME[key];
2822
- const color = value && _ansiStyles.default[value];
2823
-
2824
- if (
2825
- color &&
2826
- typeof color.close === 'string' &&
2827
- typeof color.open === 'string'
2828
- ) {
2829
- colors[key] = color;
2830
- } else {
2831
- throw new Error(
2832
- `pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`
2833
- );
2834
- }
2835
-
2836
- return colors;
2837
- }, Object.create(null));
2838
-
2839
- const getColorsEmpty = () =>
2840
- DEFAULT_THEME_KEYS.reduce((colors, key) => {
2841
- colors[key] = {
2842
- close: '',
2843
- open: ''
2844
- };
2845
- return colors;
2846
- }, Object.create(null));
2847
-
2848
- const getPrintFunctionName = options =>
2849
- options && options.printFunctionName !== undefined
2850
- ? options.printFunctionName
2851
- : DEFAULT_OPTIONS.printFunctionName;
2852
-
2853
- const getEscapeRegex = options =>
2854
- options && options.escapeRegex !== undefined
2855
- ? options.escapeRegex
2856
- : DEFAULT_OPTIONS.escapeRegex;
2857
-
2858
- const getEscapeString = options =>
2859
- options && options.escapeString !== undefined
2860
- ? options.escapeString
2861
- : DEFAULT_OPTIONS.escapeString;
2862
-
2863
- const getConfig = options => {
2864
- var _options$printBasicPr;
2865
-
2866
- return {
2867
- callToJSON:
2868
- options && options.callToJSON !== undefined
2869
- ? options.callToJSON
2870
- : DEFAULT_OPTIONS.callToJSON,
2871
- colors:
2872
- options && options.highlight
2873
- ? getColorsHighlight(options)
2874
- : getColorsEmpty(),
2875
- compareKeys:
2876
- options && typeof options.compareKeys === 'function'
2877
- ? options.compareKeys
2878
- : DEFAULT_OPTIONS.compareKeys,
2879
- escapeRegex: getEscapeRegex(options),
2880
- escapeString: getEscapeString(options),
2881
- indent:
2882
- options && options.min
2883
- ? ''
2884
- : createIndent(
2885
- options && options.indent !== undefined
2886
- ? options.indent
2887
- : DEFAULT_OPTIONS.indent
2888
- ),
2889
- maxDepth:
2890
- options && options.maxDepth !== undefined
2891
- ? options.maxDepth
2892
- : DEFAULT_OPTIONS.maxDepth,
2893
- min:
2894
- options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,
2895
- plugins:
2896
- options && options.plugins !== undefined
2897
- ? options.plugins
2898
- : DEFAULT_OPTIONS.plugins,
2899
- printBasicPrototype:
2900
- (_options$printBasicPr =
2901
- options === null || options === void 0
2902
- ? void 0
2903
- : options.printBasicPrototype) !== null &&
2904
- _options$printBasicPr !== void 0
2905
- ? _options$printBasicPr
2906
- : true,
2907
- printFunctionName: getPrintFunctionName(options),
2908
- spacingInner: options && options.min ? ' ' : '\n',
2909
- spacingOuter: options && options.min ? '' : '\n'
2910
- };
2911
- };
2912
-
2913
- function createIndent(indent) {
2914
- return new Array(indent + 1).join(' ');
2915
- }
2916
- /**
2917
- * Returns a presentation string of your `val` object
2918
- * @param val any potential JavaScript object
2919
- * @param options Custom settings
2920
- */
2921
-
2922
- function format(val, options) {
2923
- if (options) {
2924
- validateOptions(options);
2925
-
2926
- if (options.plugins) {
2927
- const plugin = findPlugin(options.plugins, val);
2928
-
2929
- if (plugin !== null) {
2930
- return printPlugin(plugin, val, getConfig(options), '', 0, []);
2931
- }
2932
- }
2933
- }
2934
-
2935
- const basicResult = printBasicValue(
2936
- val,
2937
- getPrintFunctionName(options),
2938
- getEscapeRegex(options),
2939
- getEscapeString(options)
2940
- );
2941
-
2942
- if (basicResult !== null) {
2943
- return basicResult;
2944
- }
2945
-
2946
- return printComplexValue(val, getConfig(options), '', 0, []);
2947
- }
2948
-
2949
- const plugins = {
2950
- AsymmetricMatcher: _AsymmetricMatcher.default,
2951
- ConvertAnsi: _ConvertAnsi.default,
2952
- DOMCollection: _DOMCollection.default,
2953
- DOMElement: _DOMElement.default,
2954
- Immutable: _Immutable.default,
2955
- ReactElement: _ReactElement.default,
2956
- ReactTestComponent: _ReactTestComponent.default
2957
- };
2958
- plugins_1 = build.plugins = plugins;
2959
- var _default = format;
2960
- build.default = _default;
2961
-
2962
659
  const {
2963
- DOMCollection: DOMCollection$1,
2964
- DOMElement: DOMElement$1,
2965
- Immutable: Immutable$1,
2966
- ReactElement: ReactElement$1,
2967
- ReactTestComponent: ReactTestComponent$1,
2968
- AsymmetricMatcher: AsymmetricMatcher$2
660
+ DOMCollection,
661
+ DOMElement,
662
+ Immutable,
663
+ ReactElement,
664
+ ReactTestComponent,
665
+ AsymmetricMatcher: AsymmetricMatcher$1
2969
666
  } = plugins_1;
2970
- let PLUGINS$1 = [
2971
- ReactTestComponent$1,
2972
- ReactElement$1,
2973
- DOMElement$1,
2974
- DOMCollection$1,
2975
- Immutable$1,
2976
- AsymmetricMatcher$2
667
+ let PLUGINS = [
668
+ ReactTestComponent,
669
+ ReactElement,
670
+ DOMElement,
671
+ DOMCollection,
672
+ Immutable,
673
+ AsymmetricMatcher$1
2977
674
  ];
2978
675
  const addSerializer = (plugin) => {
2979
- PLUGINS$1 = [plugin].concat(PLUGINS$1);
676
+ PLUGINS = [plugin].concat(PLUGINS);
2980
677
  };
2981
- const getSerializers = () => PLUGINS$1;
678
+ const getSerializers = () => PLUGINS;
2982
679
 
2983
680
  var __defProp$3 = Object.defineProperty;
2984
681
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
@@ -3375,18 +1072,17 @@ ${JSON.stringify(stacks)}`);
3375
1072
  }
3376
1073
  }
3377
1074
 
3378
- const resolveSnapshotPath = (testPath) => index$1.join(index$1.join(index$1.dirname(testPath), "__snapshots__"), `${index$1.basename(testPath)}.snap`);
3379
1075
  class SnapshotClient {
3380
1076
  constructor() {
3381
1077
  this.testFile = "";
3382
1078
  }
3383
- setTest(test) {
1079
+ async setTest(test) {
3384
1080
  this.test = test;
3385
1081
  if (this.testFile !== this.test.file.filepath) {
3386
1082
  if (this.snapshotState)
3387
1083
  this.saveSnap();
3388
1084
  this.testFile = this.test.file.filepath;
3389
- this.snapshotState = new SnapshotState(resolveSnapshotPath(this.testFile), getWorkerState().config.snapshotOptions);
1085
+ this.snapshotState = new SnapshotState(await rpc().resolveSnapshotPath(this.testFile), getWorkerState().config.snapshotOptions);
3390
1086
  }
3391
1087
  }
3392
1088
  clearTest() {
@@ -3684,6 +1380,38 @@ const JestChaiExpect = (chai, utils) => {
3684
1380
  assertIsMock(assertion);
3685
1381
  return assertion._obj;
3686
1382
  };
1383
+ const ordinalOf = (i) => {
1384
+ const j = i % 10;
1385
+ const k = i % 100;
1386
+ if (j === 1 && k !== 11)
1387
+ return `${i}st`;
1388
+ if (j === 2 && k !== 12)
1389
+ return `${i}nd`;
1390
+ if (j === 3 && k !== 13)
1391
+ return `${i}rd`;
1392
+ return `${i}th`;
1393
+ };
1394
+ const formatCalls = (spy, msg, actualCall) => {
1395
+ msg += c.gray(`
1396
+
1397
+ Received:
1398
+ ${spy.mock.calls.map((callArg, i) => {
1399
+ let methodCall = c.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call:
1400
+
1401
+ `);
1402
+ if (actualCall)
1403
+ methodCall += unifiedDiff(stringify(callArg), stringify(actualCall), { showLegend: false });
1404
+ else
1405
+ methodCall += stringify(callArg).split("\n").map((line) => ` ${line}`).join("\n");
1406
+ methodCall += "\n";
1407
+ return methodCall;
1408
+ }).join("\n")}`);
1409
+ msg += c.gray(`
1410
+
1411
+ Number of calls: ${c.bold(spy.mock.calls.length)}
1412
+ `);
1413
+ return msg;
1414
+ };
3687
1415
  def(["toHaveBeenCalledTimes", "toBeCalledTimes"], function(number) {
3688
1416
  const spy = getSpy(this);
3689
1417
  const spyName = spy.getMockName();
@@ -3700,25 +1428,40 @@ const JestChaiExpect = (chai, utils) => {
3700
1428
  const spy = getSpy(this);
3701
1429
  const spyName = spy.getMockName();
3702
1430
  const called = spy.mock.calls.length > 0;
3703
- return this.assert(called, `expected "${spyName}" to be called at least once`, `expected "${spyName}" to not be called at all`, true, called);
1431
+ const isNot = utils.flag(this, "negate");
1432
+ let msg = utils.getMessage(this, [
1433
+ called,
1434
+ `expected "${spyName}" to be called at least once`,
1435
+ `expected "${spyName}" to not be called at all`,
1436
+ true,
1437
+ called
1438
+ ]);
1439
+ if (called && isNot)
1440
+ msg += formatCalls(spy, msg);
1441
+ if (called && isNot || !called && !isNot) {
1442
+ const err = new Error(msg);
1443
+ err.name = "AssertionError";
1444
+ throw err;
1445
+ }
3704
1446
  });
3705
1447
  def(["toHaveBeenCalledWith", "toBeCalledWith"], function(...args) {
3706
1448
  const spy = getSpy(this);
3707
1449
  const spyName = spy.getMockName();
3708
1450
  const pass = spy.mock.calls.some((callArg) => equals(callArg, args, [iterableEquality]));
3709
- return this.assert(pass, `expected "${spyName}" to be called with arguments: #{exp}`, `expected "${spyName}" to not be called with arguments: #{exp}`, args, spy.mock.calls);
1451
+ const isNot = utils.flag(this, "negate");
1452
+ let msg = utils.getMessage(this, [
1453
+ pass,
1454
+ `expected "${spyName}" to be called with arguments: #{exp}`,
1455
+ `expected "${spyName}" to not be called with arguments: #{exp}`,
1456
+ args
1457
+ ]);
1458
+ if (pass && isNot || !pass && !isNot) {
1459
+ msg += formatCalls(spy, msg, args);
1460
+ const err = new Error(msg);
1461
+ err.name = "AssertionError";
1462
+ throw err;
1463
+ }
3710
1464
  });
3711
- const ordinalOf = (i) => {
3712
- const j = i % 10;
3713
- const k = i % 100;
3714
- if (j === 1 && k !== 11)
3715
- return `${i}st`;
3716
- if (j === 2 && k !== 12)
3717
- return `${i}nd`;
3718
- if (j === 3 && k !== 13)
3719
- return `${i}rd`;
3720
- return `${i}th`;
3721
- };
3722
1465
  def(["toHaveBeenNthCalledWith", "nthCalledWith"], function(times, ...args) {
3723
1466
  const spy = getSpy(this);
3724
1467
  const spyName = spy.getMockName();
@@ -3859,111 +1602,6 @@ const JestChaiExpect = (chai, utils) => {
3859
1602
  utils.addMethod(chai.expect, "addSnapshotSerializer", addSerializer);
3860
1603
  };
3861
1604
 
3862
- const EXPECTED_COLOR = c$1.green;
3863
- const RECEIVED_COLOR = c$1.red;
3864
- const INVERTED_COLOR = c$1.inverse;
3865
- const BOLD_WEIGHT = c$1.bold;
3866
- const DIM_COLOR = c$1.dim;
3867
- const {
3868
- AsymmetricMatcher: AsymmetricMatcher$1,
3869
- DOMCollection,
3870
- DOMElement,
3871
- Immutable,
3872
- ReactElement,
3873
- ReactTestComponent
3874
- } = plugins_1;
3875
- const PLUGINS = [
3876
- ReactTestComponent,
3877
- ReactElement,
3878
- DOMElement,
3879
- DOMCollection,
3880
- Immutable,
3881
- AsymmetricMatcher$1
3882
- ];
3883
- function matcherHint(matcherName, received = "received", expected = "expected", options = {}) {
3884
- const {
3885
- comment = "",
3886
- expectedColor = EXPECTED_COLOR,
3887
- isDirectExpectCall = false,
3888
- isNot = false,
3889
- promise = "",
3890
- receivedColor = RECEIVED_COLOR,
3891
- secondArgument = "",
3892
- secondArgumentColor = EXPECTED_COLOR
3893
- } = options;
3894
- let hint = "";
3895
- let dimString = "expect";
3896
- if (!isDirectExpectCall && received !== "") {
3897
- hint += DIM_COLOR(`${dimString}(`) + receivedColor(received);
3898
- dimString = ")";
3899
- }
3900
- if (promise !== "") {
3901
- hint += DIM_COLOR(`${dimString}.`) + promise;
3902
- dimString = "";
3903
- }
3904
- if (isNot) {
3905
- hint += `${DIM_COLOR(`${dimString}.`)}not`;
3906
- dimString = "";
3907
- }
3908
- if (matcherName.includes(".")) {
3909
- dimString += matcherName;
3910
- } else {
3911
- hint += DIM_COLOR(`${dimString}.`) + matcherName;
3912
- dimString = "";
3913
- }
3914
- if (expected === "") {
3915
- dimString += "()";
3916
- } else {
3917
- hint += DIM_COLOR(`${dimString}(`) + expectedColor(expected);
3918
- if (secondArgument)
3919
- hint += DIM_COLOR(", ") + secondArgumentColor(secondArgument);
3920
- dimString = ")";
3921
- }
3922
- if (comment !== "")
3923
- dimString += ` // ${comment}`;
3924
- if (dimString !== "")
3925
- hint += DIM_COLOR(dimString);
3926
- return hint;
3927
- }
3928
- const SPACE_SYMBOL = "\xB7";
3929
- const replaceTrailingSpaces = (text) => text.replace(/\s+$/gm, (spaces) => SPACE_SYMBOL.repeat(spaces.length));
3930
- const stringify = (object, maxDepth = 10) => {
3931
- const MAX_LENGTH = 1e4;
3932
- let result;
3933
- try {
3934
- result = format_1(object, {
3935
- maxDepth,
3936
- plugins: PLUGINS
3937
- });
3938
- } catch {
3939
- result = format_1(object, {
3940
- callToJSON: false,
3941
- maxDepth,
3942
- plugins: PLUGINS
3943
- });
3944
- }
3945
- return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(maxDepth / 2)) : result;
3946
- };
3947
- const printReceived = (object) => RECEIVED_COLOR(replaceTrailingSpaces(stringify(object)));
3948
- const printExpected = (value) => EXPECTED_COLOR(replaceTrailingSpaces(stringify(value)));
3949
- function diff(a, b, options) {
3950
- return unifiedDiff(stringify(a), stringify(b));
3951
- }
3952
-
3953
- var matcherUtils = /*#__PURE__*/Object.freeze({
3954
- __proto__: null,
3955
- EXPECTED_COLOR: EXPECTED_COLOR,
3956
- RECEIVED_COLOR: RECEIVED_COLOR,
3957
- INVERTED_COLOR: INVERTED_COLOR,
3958
- BOLD_WEIGHT: BOLD_WEIGHT,
3959
- DIM_COLOR: DIM_COLOR,
3960
- matcherHint: matcherHint,
3961
- stringify: stringify,
3962
- printReceived: printReceived,
3963
- printExpected: printExpected,
3964
- diff: diff
3965
- });
3966
-
3967
1605
  var __defProp$1 = Object.defineProperty;
3968
1606
  var __defProps$1 = Object.defineProperties;
3969
1607
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
@@ -7033,6 +4671,10 @@ class VitestUtils {
7033
4671
  globalThis.window[name] = value;
7034
4672
  return this;
7035
4673
  }
4674
+ resetModules() {
4675
+ resetModules();
4676
+ return this;
4677
+ }
7036
4678
  }
7037
4679
  const vitest = new VitestUtils();
7038
4680
  const vi = vitest;
@@ -7047,7 +4689,7 @@ function isWatchMode() {
7047
4689
  var index = /*#__PURE__*/Object.freeze({
7048
4690
  __proto__: null,
7049
4691
  suite: suite,
7050
- test: test$7,
4692
+ test: test,
7051
4693
  describe: describe,
7052
4694
  it: it,
7053
4695
  runOnce: runOnce,
@@ -7060,14 +4702,10 @@ var index = /*#__PURE__*/Object.freeze({
7060
4702
  should: should,
7061
4703
  chai: chai$1,
7062
4704
  expect: expect,
7063
- spies: spies,
7064
- isMockFunction: isMockFunction,
7065
- spyOn: spyOn,
7066
- fn: fn,
7067
4705
  vitest: vitest,
7068
4706
  vi: vi,
7069
4707
  getRunningMode: getRunningMode,
7070
4708
  isWatchMode: isWatchMode
7071
4709
  });
7072
4710
 
7073
- export { isWatchMode as A, RealDate as R, setHooks as a, context as b, clearContext as c, defaultSuite as d, getSnapshotClient as e, setState as f, getHooks as g, getFn as h, index as i, getState as j, suite as k, describe as l, it as m, runOnce as n, isFirstRun as o, beforeAll as p, afterAll as q, resetRunOnceCounter as r, stringify as s, test$7 as t, beforeEach as u, vi as v, afterEach as w, expect as x, vitest as y, getRunningMode as z };
4711
+ export { RealDate as R, context as a, getSnapshotClient as b, clearContext as c, defaultSuite as d, setState as e, getFn as f, getHooks as g, getState as h, index as i, suite as j, describe as k, it as l, runOnce as m, isFirstRun as n, beforeAll as o, afterAll as p, beforeEach as q, resetRunOnceCounter as r, setHooks as s, test as t, afterEach as u, vi as v, expect as w, vitest as x, getRunningMode as y, isWatchMode as z };