@powerlines/plugin-open-feature 0.1.184 → 0.1.186

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.
Files changed (96) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +14 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +18 -0
  3. package/dist/components/features-builtin.cjs +10 -3
  4. package/dist/components/features-builtin.mjs +4 -2
  5. package/dist/components/features-builtin.mjs.map +1 -1
  6. package/dist/components/features-builtin.test.cjs +16 -0
  7. package/dist/components/features-builtin.test.d.cts +1 -0
  8. package/dist/components/features-builtin.test.d.mts +1 -0
  9. package/dist/components/features-builtin.test.mjs +18 -0
  10. package/dist/components/features-builtin.test.mjs.map +1 -0
  11. package/dist/helpers/automd-generator.cjs +8 -0
  12. package/dist/helpers/automd-generator.mjs +3 -1
  13. package/dist/helpers/automd-generator.mjs.map +1 -1
  14. package/dist/helpers/automd-generator.test.cjs +16 -0
  15. package/dist/helpers/automd-generator.test.d.cts +1 -0
  16. package/dist/helpers/automd-generator.test.d.mts +1 -0
  17. package/dist/helpers/automd-generator.test.mjs +18 -0
  18. package/dist/helpers/automd-generator.test.mjs.map +1 -0
  19. package/dist/index.cjs +3 -3
  20. package/dist/index.mjs +2 -2
  21. package/dist/index.test.cjs +30 -0
  22. package/dist/index.test.d.cts +1 -0
  23. package/dist/index.test.d.mts +1 -0
  24. package/dist/index.test.mjs +32 -0
  25. package/dist/index.test.mjs.map +1 -0
  26. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +78 -0
  27. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
  28. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
  29. package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.cjs +1487 -0
  30. package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs +1473 -0
  31. package/dist/node_modules/.pnpm/@vitest_expect@4.1.7/node_modules/@vitest/expect/dist/index.mjs.map +1 -0
  32. package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.cjs +889 -0
  33. package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs +888 -0
  34. package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -0
  35. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.cjs +1614 -0
  36. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs +1594 -0
  37. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/chunk-artifact.mjs.map +1 -0
  38. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.cjs +1 -0
  39. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/index.mjs +3 -0
  40. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.cjs +1 -0
  41. package/dist/node_modules/.pnpm/@vitest_runner@4.1.7/node_modules/@vitest/runner/dist/utils.mjs +3 -0
  42. package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.cjs +923 -0
  43. package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs +922 -0
  44. package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.7/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -0
  45. package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.cjs +391 -0
  46. package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs +386 -0
  47. package/dist/node_modules/.pnpm/@vitest_spy@4.1.7/node_modules/@vitest/spy/dist/index.mjs.map +1 -0
  48. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.cjs +82 -0
  49. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +82 -0
  50. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs.map +1 -0
  51. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.cjs +1358 -0
  52. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs +1357 -0
  53. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/diff.mjs.map +1 -0
  54. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.cjs +561 -0
  55. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs +559 -0
  56. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/display.mjs.map +1 -0
  57. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.cjs +37 -0
  58. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs +38 -0
  59. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/error.mjs.map +1 -0
  60. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.cjs +197 -0
  61. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs +181 -0
  62. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -0
  63. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.cjs +29 -0
  64. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs +27 -0
  65. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/offset.mjs.map +1 -0
  66. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.cjs +77 -0
  67. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs +77 -0
  68. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/serialize.mjs.map +1 -0
  69. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.cjs +374 -0
  70. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs +374 -0
  71. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -0
  72. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.cjs +38 -0
  73. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs +37 -0
  74. package/dist/node_modules/.pnpm/@vitest_utils@4.1.7/node_modules/@vitest/utils/dist/timers.mjs.map +1 -0
  75. package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.cjs +2978 -0
  76. package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs +2973 -0
  77. package/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs.map +1 -0
  78. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +939 -0
  79. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
  80. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
  81. package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.cjs +87 -0
  82. package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs +87 -0
  83. package/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs.map +1 -0
  84. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.cjs +6 -0
  85. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +6 -0
  86. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs.map +1 -0
  87. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.cjs +54 -0
  88. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs +52 -0
  89. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs.map +1 -0
  90. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.cjs +2696 -0
  91. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs +2697 -0
  92. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs.map +1 -0
  93. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.cjs +47 -0
  94. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs +45 -0
  95. package/dist/node_modules/.pnpm/vitest@4.1.7_@opentelemetry_api@1.9.1_@types_node@25.9.1_@vitest_coverage-v8@4.1.7_vite_34dd47607c0af5e5ae7f1b2f95fc48c3/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs.map +1 -0
  96. package/package.json +70 -15
@@ -0,0 +1,561 @@
1
+ const require_index = require('../../../../../@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.cjs');
2
+
3
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/display.js
4
+ const ansiColors = {
5
+ bold: ["1", "22"],
6
+ dim: ["2", "22"],
7
+ italic: ["3", "23"],
8
+ underline: ["4", "24"],
9
+ inverse: ["7", "27"],
10
+ hidden: ["8", "28"],
11
+ strike: ["9", "29"],
12
+ black: ["30", "39"],
13
+ red: ["31", "39"],
14
+ green: ["32", "39"],
15
+ yellow: ["33", "39"],
16
+ blue: ["34", "39"],
17
+ magenta: ["35", "39"],
18
+ cyan: ["36", "39"],
19
+ white: ["37", "39"],
20
+ brightblack: ["30;1", "39"],
21
+ brightred: ["31;1", "39"],
22
+ brightgreen: ["32;1", "39"],
23
+ brightyellow: ["33;1", "39"],
24
+ brightblue: ["34;1", "39"],
25
+ brightmagenta: ["35;1", "39"],
26
+ brightcyan: ["36;1", "39"],
27
+ brightwhite: ["37;1", "39"],
28
+ grey: ["90", "39"]
29
+ };
30
+ const styles = {
31
+ special: "cyan",
32
+ number: "yellow",
33
+ bigint: "yellow",
34
+ boolean: "yellow",
35
+ undefined: "grey",
36
+ null: "bold",
37
+ string: "green",
38
+ symbol: "green",
39
+ date: "magenta",
40
+ regexp: "red"
41
+ };
42
+ const truncator = "…";
43
+ function colorise(value, styleType) {
44
+ const color = ansiColors[styles[styleType]] || ansiColors[styleType] || "";
45
+ if (!color) return String(value);
46
+ return `\u001b[${color[0]}m${String(value)}\u001b[${color[1]}m`;
47
+ }
48
+ function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [], truncate = Infinity, stylize = String } = {}, inspect) {
49
+ const options = {
50
+ showHidden: Boolean(showHidden),
51
+ depth: Number(depth),
52
+ colors: Boolean(colors),
53
+ customInspect: Boolean(customInspect),
54
+ showProxy: Boolean(showProxy),
55
+ maxArrayLength: Number(maxArrayLength),
56
+ breakLength: Number(breakLength),
57
+ truncate: Number(truncate),
58
+ seen,
59
+ inspect,
60
+ stylize
61
+ };
62
+ if (options.colors) options.stylize = colorise;
63
+ return options;
64
+ }
65
+ function isHighSurrogate(char) {
66
+ return char >= "\ud800" && char <= "\udbff";
67
+ }
68
+ function truncate(string, length, tail = truncator) {
69
+ string = String(string);
70
+ const tailLength = tail.length;
71
+ const stringLength = string.length;
72
+ if (tailLength > length && stringLength > tailLength) return tail;
73
+ if (stringLength > length && stringLength > tailLength) {
74
+ let end = length - tailLength;
75
+ if (end > 0 && isHighSurrogate(string[end - 1])) end = end - 1;
76
+ return `${string.slice(0, end)}${tail}`;
77
+ }
78
+ return string;
79
+ }
80
+ function inspectList(list, options, inspectItem, separator = ", ") {
81
+ inspectItem = inspectItem || options.inspect;
82
+ const size = list.length;
83
+ if (size === 0) return "";
84
+ const originalLength = options.truncate;
85
+ let output = "";
86
+ let peek = "";
87
+ let truncated = "";
88
+ for (let i = 0; i < size; i += 1) {
89
+ const last = i + 1 === list.length;
90
+ const secondToLast = i + 2 === list.length;
91
+ truncated = `${truncator}(${list.length - i})`;
92
+ const value = list[i];
93
+ options.truncate = originalLength - output.length - (last ? 0 : separator.length);
94
+ const string = peek || inspectItem(value, options) + (last ? "" : separator);
95
+ const nextLength = output.length + string.length;
96
+ const truncatedLength = nextLength + truncated.length;
97
+ if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) break;
98
+ if (!last && !secondToLast && truncatedLength > originalLength) break;
99
+ peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator);
100
+ if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) break;
101
+ output += string;
102
+ if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
103
+ truncated = `${truncator}(${list.length - i - 1})`;
104
+ break;
105
+ }
106
+ truncated = "";
107
+ }
108
+ return `${output}${truncated}`;
109
+ }
110
+ function quoteComplexKey(key) {
111
+ if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) return key;
112
+ return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, "\"").replace(/(^"|"$)/g, "'");
113
+ }
114
+ function inspectProperty([key, value], options) {
115
+ options.truncate -= 2;
116
+ if (typeof key === "string") key = quoteComplexKey(key);
117
+ else if (typeof key !== "number") key = `[${options.inspect(key, options)}]`;
118
+ options.truncate -= key.length;
119
+ value = options.inspect(value, options);
120
+ return `${key}: ${value}`;
121
+ }
122
+ function inspectArray(array, options) {
123
+ const nonIndexProperties = Object.keys(array).slice(array.length);
124
+ if (!array.length && !nonIndexProperties.length) return "[]";
125
+ options.truncate -= 4;
126
+ const listContents = inspectList(array, options);
127
+ options.truncate -= listContents.length;
128
+ let propertyContents = "";
129
+ if (nonIndexProperties.length) propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
130
+ return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
131
+ }
132
+ const getArrayName = (array) => {
133
+ if (typeof Buffer === "function" && array instanceof Buffer) return "Buffer";
134
+ if (array[Symbol.toStringTag]) return array[Symbol.toStringTag];
135
+ return array.constructor.name;
136
+ };
137
+ function inspectTypedArray(array, options) {
138
+ const name = getArrayName(array);
139
+ options.truncate -= name.length + 4;
140
+ const nonIndexProperties = Object.keys(array).slice(array.length);
141
+ if (!array.length && !nonIndexProperties.length) return `${name}[]`;
142
+ let output = "";
143
+ for (let i = 0; i < array.length; i++) {
144
+ const string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
145
+ options.truncate -= string.length;
146
+ if (array[i] !== array.length && options.truncate <= 3) {
147
+ output += `${truncator}(${array.length - array[i] + 1})`;
148
+ break;
149
+ }
150
+ output += string;
151
+ }
152
+ let propertyContents = "";
153
+ if (nonIndexProperties.length) propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
154
+ return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
155
+ }
156
+ function inspectDate(dateObject, options) {
157
+ const stringRepresentation = dateObject.toJSON();
158
+ if (stringRepresentation === null) return "Invalid Date";
159
+ const split = stringRepresentation.split("T");
160
+ const date = split[0];
161
+ return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
162
+ }
163
+ function inspectFunction(func, options) {
164
+ const functionType = func[Symbol.toStringTag] || "Function";
165
+ const name = func.name;
166
+ if (!name) return options.stylize(`[${functionType}]`, "special");
167
+ return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special");
168
+ }
169
+ function inspectMapEntry([key, value], options) {
170
+ options.truncate -= 4;
171
+ key = options.inspect(key, options);
172
+ options.truncate -= key.length;
173
+ value = options.inspect(value, options);
174
+ return `${key} => ${value}`;
175
+ }
176
+ function mapToEntries(map) {
177
+ const entries = [];
178
+ map.forEach((value, key) => {
179
+ entries.push([key, value]);
180
+ });
181
+ return entries;
182
+ }
183
+ function inspectMap(map, options) {
184
+ if (map.size === 0) return "Map{}";
185
+ options.truncate -= 7;
186
+ return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
187
+ }
188
+ const isNaN = Number.isNaN || ((i) => i !== i);
189
+ function inspectNumber(number, options) {
190
+ if (isNaN(number)) return options.stylize("NaN", "number");
191
+ if (number === Infinity) return options.stylize("Infinity", "number");
192
+ if (number === -Infinity) return options.stylize("-Infinity", "number");
193
+ if (number === 0) return options.stylize(1 / number === Infinity ? "+0" : "-0", "number");
194
+ return options.stylize(truncate(String(number), options.truncate), "number");
195
+ }
196
+ function inspectBigInt(number, options) {
197
+ let nums = truncate(number.toString(), options.truncate - 1);
198
+ if (nums !== truncator) nums += "n";
199
+ return options.stylize(nums, "bigint");
200
+ }
201
+ function inspectRegExp(value, options) {
202
+ const flags = value.toString().split("/")[2];
203
+ const sourceLength = options.truncate - (2 + flags.length);
204
+ const source = value.source;
205
+ return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
206
+ }
207
+ function arrayFromSet(set) {
208
+ const values = [];
209
+ set.forEach((value) => {
210
+ values.push(value);
211
+ });
212
+ return values;
213
+ }
214
+ function inspectSet(set, options) {
215
+ if (set.size === 0) return "Set{}";
216
+ options.truncate -= 7;
217
+ return `Set{ ${inspectList(arrayFromSet(set), options)} }`;
218
+ }
219
+ const stringEscapeChars = /* @__PURE__ */ new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
220
+ const escapeCharacters = {
221
+ "\b": "\\b",
222
+ " ": "\\t",
223
+ "\n": "\\n",
224
+ "\f": "\\f",
225
+ "\r": "\\r",
226
+ "'": "\\'",
227
+ "\\": "\\\\"
228
+ };
229
+ const hex = 16;
230
+ function escape(char) {
231
+ return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-4)}`;
232
+ }
233
+ function inspectString(string, options) {
234
+ if (stringEscapeChars.test(string)) string = string.replace(stringEscapeChars, escape);
235
+ return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
236
+ }
237
+ function inspectSymbol(value) {
238
+ if ("description" in Symbol.prototype) return value.description ? `Symbol(${value.description})` : "Symbol()";
239
+ return value.toString();
240
+ }
241
+ const getPromiseValue = () => "Promise{…}";
242
+ function inspectObject$1(object, options) {
243
+ const properties = Object.getOwnPropertyNames(object);
244
+ const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
245
+ if (properties.length === 0 && symbols.length === 0) return "{}";
246
+ options.truncate -= 4;
247
+ options.seen = options.seen || [];
248
+ if (options.seen.includes(object)) return "[Circular]";
249
+ options.seen.push(object);
250
+ const propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty);
251
+ const symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
252
+ options.seen.pop();
253
+ let sep = "";
254
+ if (propertyContents && symbolContents) sep = ", ";
255
+ return `{ ${propertyContents}${sep}${symbolContents} }`;
256
+ }
257
+ const toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
258
+ function inspectClass(value, options) {
259
+ let name = "";
260
+ if (toStringTag && toStringTag in value) name = value[toStringTag];
261
+ name = name || value.constructor.name;
262
+ if (!name || name === "_class") name = "<Anonymous Class>";
263
+ options.truncate -= name.length;
264
+ return `${name}${inspectObject$1(value, options)}`;
265
+ }
266
+ function inspectArguments(args, options) {
267
+ if (args.length === 0) return "Arguments[]";
268
+ options.truncate -= 13;
269
+ return `Arguments[ ${inspectList(args, options)} ]`;
270
+ }
271
+ const errorKeys = [
272
+ "stack",
273
+ "line",
274
+ "column",
275
+ "name",
276
+ "message",
277
+ "fileName",
278
+ "lineNumber",
279
+ "columnNumber",
280
+ "number",
281
+ "description",
282
+ "cause"
283
+ ];
284
+ function inspectObject(error, options) {
285
+ const properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1);
286
+ const name = error.name;
287
+ options.truncate -= name.length;
288
+ let message = "";
289
+ if (typeof error.message === "string") message = truncate(error.message, options.truncate);
290
+ else properties.unshift("message");
291
+ message = message ? `: ${message}` : "";
292
+ options.truncate -= message.length + 5;
293
+ options.seen = options.seen || [];
294
+ if (options.seen.includes(error)) return "[Circular]";
295
+ options.seen.push(error);
296
+ const propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
297
+ return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
298
+ }
299
+ function inspectAttribute([key, value], options) {
300
+ options.truncate -= 3;
301
+ if (!value) return `${options.stylize(String(key), "yellow")}`;
302
+ return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
303
+ }
304
+ function inspectNodeCollection(collection, options) {
305
+ return inspectList(collection, options, inspectNode, "\n");
306
+ }
307
+ function inspectNode(node, options) {
308
+ switch (node.nodeType) {
309
+ case 1: return inspectHTML(node, options);
310
+ case 3: return options.inspect(node.data, options);
311
+ default: return options.inspect(node, options);
312
+ }
313
+ }
314
+ function inspectHTML(element, options) {
315
+ const properties = element.getAttributeNames();
316
+ const name = element.tagName.toLowerCase();
317
+ const head = options.stylize(`<${name}`, "special");
318
+ const headClose = options.stylize(`>`, "special");
319
+ const tail = options.stylize(`</${name}>`, "special");
320
+ options.truncate -= name.length * 2 + 5;
321
+ let propertyContents = "";
322
+ if (properties.length > 0) {
323
+ propertyContents += " ";
324
+ propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ");
325
+ }
326
+ options.truncate -= propertyContents.length;
327
+ const truncate = options.truncate;
328
+ let children = inspectNodeCollection(element.children, options);
329
+ if (children && children.length > truncate) children = `${truncator}(${element.children.length})`;
330
+ return `${head}${propertyContents}${headClose}${children}${tail}`;
331
+ }
332
+ const chaiInspect = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("chai/inspect") : "@@chai/inspect";
333
+ const nodeInspect = Symbol.for("nodejs.util.inspect.custom");
334
+ const constructorMap = /* @__PURE__ */ new WeakMap();
335
+ const stringTagMap = {};
336
+ const baseTypesMap = {
337
+ undefined: (value, options) => options.stylize("undefined", "undefined"),
338
+ null: (value, options) => options.stylize("null", "null"),
339
+ boolean: (value, options) => options.stylize(String(value), "boolean"),
340
+ Boolean: (value, options) => options.stylize(String(value), "boolean"),
341
+ number: inspectNumber,
342
+ Number: inspectNumber,
343
+ bigint: inspectBigInt,
344
+ BigInt: inspectBigInt,
345
+ string: inspectString,
346
+ String: inspectString,
347
+ function: inspectFunction,
348
+ Function: inspectFunction,
349
+ symbol: inspectSymbol,
350
+ Symbol: inspectSymbol,
351
+ Array: inspectArray,
352
+ Date: inspectDate,
353
+ Map: inspectMap,
354
+ Set: inspectSet,
355
+ RegExp: inspectRegExp,
356
+ Promise: getPromiseValue,
357
+ WeakSet: (value, options) => options.stylize("WeakSet{…}", "special"),
358
+ WeakMap: (value, options) => options.stylize("WeakMap{…}", "special"),
359
+ Arguments: inspectArguments,
360
+ Int8Array: inspectTypedArray,
361
+ Uint8Array: inspectTypedArray,
362
+ Uint8ClampedArray: inspectTypedArray,
363
+ Int16Array: inspectTypedArray,
364
+ Uint16Array: inspectTypedArray,
365
+ Int32Array: inspectTypedArray,
366
+ Uint32Array: inspectTypedArray,
367
+ Float32Array: inspectTypedArray,
368
+ Float64Array: inspectTypedArray,
369
+ Generator: () => "",
370
+ DataView: () => "",
371
+ ArrayBuffer: () => "",
372
+ Error: inspectObject,
373
+ HTMLCollection: inspectNodeCollection,
374
+ NodeList: inspectNodeCollection
375
+ };
376
+ const inspectCustom = (value, options, type, inspectFn) => {
377
+ if (chaiInspect in value && typeof value[chaiInspect] === "function") return value[chaiInspect](options);
378
+ if (nodeInspect in value && typeof value[nodeInspect] === "function") return value[nodeInspect](options.depth, options, inspectFn);
379
+ if ("inspect" in value && typeof value.inspect === "function") return value.inspect(options.depth, options);
380
+ if ("constructor" in value && constructorMap.has(value.constructor)) return constructorMap.get(value.constructor)(value, options);
381
+ if (stringTagMap[type]) return stringTagMap[type](value, options);
382
+ return "";
383
+ };
384
+ const toString = Object.prototype.toString;
385
+ function inspect$1(value, opts = {}) {
386
+ const options = normaliseOptions(opts, inspect$1);
387
+ const { customInspect } = options;
388
+ let type = value === null ? "null" : typeof value;
389
+ if (type === "object") type = toString.call(value).slice(8, -1);
390
+ if (type in baseTypesMap) return baseTypesMap[type](value, options);
391
+ if (customInspect && value) {
392
+ const output = inspectCustom(value, options, type, inspect$1);
393
+ if (output) {
394
+ if (typeof output === "string") return output;
395
+ return inspect$1(output, options);
396
+ }
397
+ }
398
+ const proto = value ? Object.getPrototypeOf(value) : false;
399
+ if (proto === Object.prototype || proto === null) return inspectObject$1(value, options);
400
+ if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) return inspectHTML(value, options);
401
+ if ("constructor" in value) {
402
+ if (value.constructor !== Object) return inspectClass(value, options);
403
+ return inspectObject$1(value, options);
404
+ }
405
+ if (value === Object(value)) return inspectObject$1(value, options);
406
+ return options.stylize(String(value), type);
407
+ }
408
+ const { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = require_index.plugins;
409
+ const PLUGINS = [
410
+ ReactTestComponent,
411
+ ReactElement,
412
+ DOMElement,
413
+ DOMCollection,
414
+ Immutable,
415
+ AsymmetricMatcher
416
+ ];
417
+ function stringify(object, maxDepth = 10, { maxLength, filterNode, ...options } = {}) {
418
+ const MAX_LENGTH = maxLength ?? 1e4;
419
+ let result;
420
+ const filterFn = typeof filterNode === "string" ? createNodeFilterFromSelector(filterNode) : filterNode;
421
+ const plugins = filterFn ? [
422
+ ReactTestComponent,
423
+ ReactElement,
424
+ require_index.createDOMElementFilter(filterFn),
425
+ DOMCollection,
426
+ Immutable,
427
+ AsymmetricMatcher
428
+ ] : PLUGINS;
429
+ try {
430
+ result = require_index.format(object, {
431
+ maxDepth,
432
+ escapeString: false,
433
+ plugins,
434
+ ...options
435
+ });
436
+ } catch {
437
+ result = require_index.format(object, {
438
+ callToJSON: false,
439
+ maxDepth,
440
+ escapeString: false,
441
+ plugins,
442
+ ...options
443
+ });
444
+ }
445
+ return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), {
446
+ maxLength,
447
+ filterNode,
448
+ ...options
449
+ }) : result;
450
+ }
451
+ function createNodeFilterFromSelector(selector) {
452
+ const ELEMENT_NODE = 1;
453
+ const COMMENT_NODE = 8;
454
+ return (node) => {
455
+ if (node.nodeType === COMMENT_NODE) return false;
456
+ if (node.nodeType === ELEMENT_NODE && node.matches) try {
457
+ return !node.matches(selector);
458
+ } catch {
459
+ return true;
460
+ }
461
+ return true;
462
+ };
463
+ }
464
+ const formatRegExp = /%[sdjifoOc%]/g;
465
+ function baseFormat(args, options = {}) {
466
+ const formatArg = (item, inspecOptions) => {
467
+ if (options.prettifyObject) return stringify(item, void 0, {
468
+ printBasicPrototype: false,
469
+ escapeString: false
470
+ });
471
+ return inspect(item, inspecOptions);
472
+ };
473
+ if (typeof args[0] !== "string") {
474
+ const objects = [];
475
+ for (let i = 0; i < args.length; i++) objects.push(formatArg(args[i], {
476
+ depth: 0,
477
+ colors: false
478
+ }));
479
+ return objects.join(" ");
480
+ }
481
+ const len = args.length;
482
+ let i = 1;
483
+ const template = args[0];
484
+ let str = String(template).replace(formatRegExp, (x) => {
485
+ if (x === "%%") return "%";
486
+ if (i >= len) return x;
487
+ switch (x) {
488
+ case "%s": {
489
+ const value = args[i++];
490
+ if (typeof value === "bigint") return `${value.toString()}n`;
491
+ if (typeof value === "number" && value === 0 && 1 / value < 0) return "-0";
492
+ if (typeof value === "object" && value !== null) {
493
+ if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) return value.toString();
494
+ return formatArg(value, {
495
+ depth: 0,
496
+ colors: false
497
+ });
498
+ }
499
+ return String(value);
500
+ }
501
+ case "%d": {
502
+ const value = args[i++];
503
+ if (typeof value === "bigint") return `${value.toString()}n`;
504
+ if (typeof value === "symbol") return "NaN";
505
+ return Number(value).toString();
506
+ }
507
+ case "%i": {
508
+ const value = args[i++];
509
+ if (typeof value === "bigint") return `${value.toString()}n`;
510
+ return Number.parseInt(String(value)).toString();
511
+ }
512
+ case "%f": return Number.parseFloat(String(args[i++])).toString();
513
+ case "%o": return formatArg(args[i++], {
514
+ showHidden: true,
515
+ showProxy: true
516
+ });
517
+ case "%O": return formatArg(args[i++]);
518
+ case "%c":
519
+ i++;
520
+ return "";
521
+ case "%j": try {
522
+ return JSON.stringify(args[i++]);
523
+ } catch (err) {
524
+ const m = err.message;
525
+ if (m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")) return "[Circular]";
526
+ throw err;
527
+ }
528
+ default: return x;
529
+ }
530
+ });
531
+ for (let x = args[i]; i < len; x = args[++i]) if (x === null || typeof x !== "object") str += ` ${typeof x === "symbol" ? x.toString() : x}`;
532
+ else str += ` ${formatArg(x)}`;
533
+ return str;
534
+ }
535
+ function format(...args) {
536
+ return baseFormat(args);
537
+ }
538
+ function inspect(obj, options = {}) {
539
+ if (options.truncate === 0) options.truncate = Number.POSITIVE_INFINITY;
540
+ return inspect$1(obj, options);
541
+ }
542
+ function objDisplay(obj, options = {}) {
543
+ if (typeof options.truncate === "undefined") options.truncate = 40;
544
+ const str = inspect(obj, options);
545
+ const type = Object.prototype.toString.call(obj);
546
+ if (options.truncate && str.length >= options.truncate) if (type === "[object Function]") {
547
+ const fn = obj;
548
+ return !fn.name ? "[Function]" : `[Function: ${fn.name}]`;
549
+ } else if (type === "[object Array]") return `[ Array(${obj.length}) ]`;
550
+ else if (type === "[object Object]") {
551
+ const keys = Object.keys(obj);
552
+ return `{ Object (${keys.length > 2 ? `${keys.splice(0, 2).join(", ")}, ...` : keys.join(", ")}) }`;
553
+ } else return str;
554
+ return str;
555
+ }
556
+
557
+ //#endregion
558
+ exports.format = format;
559
+ exports.formatRegExp = formatRegExp;
560
+ exports.objDisplay = objDisplay;
561
+ exports.stringify = stringify;