@powerlines/plugin-open-telemetry 0.1.112 → 0.1.114

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/trace-builtin.cjs +10 -3
  4. package/dist/components/trace-builtin.mjs +4 -2
  5. package/dist/components/trace-builtin.mjs.map +1 -1
  6. package/dist/components/trace-builtin.test.cjs +16 -0
  7. package/dist/components/trace-builtin.test.d.cts +1 -0
  8. package/dist/components/trace-builtin.test.d.mts +1 -0
  9. package/dist/components/trace-builtin.test.mjs +18 -0
  10. package/dist/components/trace-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,37 @@
1
+ require('../../../../../tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.cjs');
2
+ const require_index$1 = require('../../../../../@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.cjs');
3
+ const require_diff = require('./diff.cjs');
4
+ const require_serialize = require('./serialize.cjs');
5
+
6
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/error.js
7
+ function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
8
+ if (!_err || typeof _err !== "object") return { message: String(_err) };
9
+ const err = _err;
10
+ if (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) {
11
+ const options = {
12
+ ...diffOptions,
13
+ ...err.diffOptions
14
+ };
15
+ err.diff = require_diff.printDiffOrStringify(err.actual, err.expected, options, err);
16
+ err.expected = prettifyValue(err.expected, options);
17
+ err.actual = prettifyValue(err.actual, options);
18
+ }
19
+ try {
20
+ if (!seen.has(err) && typeof err.cause === "object") {
21
+ seen.add(err);
22
+ err.cause = processError(err.cause, diffOptions, seen);
23
+ }
24
+ } catch {}
25
+ try {
26
+ return require_serialize.serializeValue(err);
27
+ } catch (e) {
28
+ return require_serialize.serializeValue(/* @__PURE__ */ new Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${err?.message}`));
29
+ }
30
+ }
31
+ function prettifyValue(value, options) {
32
+ if (typeof value !== "string") return require_index$1.format(value, require_diff.getDefaultFormatOptions(options));
33
+ return value;
34
+ }
35
+
36
+ //#endregion
37
+ exports.processError = processError;
@@ -0,0 +1,38 @@
1
+ import "../../../../../tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.mjs";
2
+ import { format } from "../../../../../@vitest_pretty-format@4.1.7/node_modules/@vitest/pretty-format/dist/index.mjs";
3
+ import { getDefaultFormatOptions, printDiffOrStringify } from "./diff.mjs";
4
+ import { serializeValue } from "./serialize.mjs";
5
+
6
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/error.js
7
+ function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
8
+ if (!_err || typeof _err !== "object") return { message: String(_err) };
9
+ const err = _err;
10
+ if (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) {
11
+ const options = {
12
+ ...diffOptions,
13
+ ...err.diffOptions
14
+ };
15
+ err.diff = printDiffOrStringify(err.actual, err.expected, options, err);
16
+ err.expected = prettifyValue(err.expected, options);
17
+ err.actual = prettifyValue(err.actual, options);
18
+ }
19
+ try {
20
+ if (!seen.has(err) && typeof err.cause === "object") {
21
+ seen.add(err);
22
+ err.cause = processError(err.cause, diffOptions, seen);
23
+ }
24
+ } catch {}
25
+ try {
26
+ return serializeValue(err);
27
+ } catch (e) {
28
+ return serializeValue(/* @__PURE__ */ new Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${err?.message}`));
29
+ }
30
+ }
31
+ function prettifyValue(value, options) {
32
+ if (typeof value !== "string") return format(value, getDefaultFormatOptions(options));
33
+ return value;
34
+ }
35
+
36
+ //#endregion
37
+ export { processError };
38
+ //# sourceMappingURL=error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/error.js"],"sourcesContent":["import { format } from '@vitest/pretty-format';\nimport { printDiffOrStringify, getDefaultFormatOptions } from './diff.js';\nimport { serializeValue } from './serialize.js';\nimport 'tinyrainbow';\nimport './display.js';\nimport './helpers.js';\nimport './constants.js';\n\nfunction processError(_err, diffOptions, seen = new WeakSet()) {\n\tif (!_err || typeof _err !== \"object\") {\n\t\treturn { message: String(_err) };\n\t}\n\tconst err = _err;\n\tif (err.showDiff || err.showDiff === undefined && err.expected !== undefined && err.actual !== undefined) {\n\t\tconst options = {\n\t\t\t...diffOptions,\n\t\t\t...err.diffOptions\n\t\t};\n\t\terr.diff = printDiffOrStringify(err.actual, err.expected, options, err);\n\t\terr.expected = prettifyValue(err.expected, options);\n\t\terr.actual = prettifyValue(err.actual, options);\n\t}\n\t// some Error implementations may not allow rewriting cause\n\t// in most cases, the assignment will lead to \"err.cause = err.cause\"\n\ttry {\n\t\tif (!seen.has(err) && typeof err.cause === \"object\") {\n\t\t\tseen.add(err);\n\t\t\terr.cause = processError(err.cause, diffOptions, seen);\n\t\t}\n\t} catch {}\n\ttry {\n\t\treturn serializeValue(err);\n\t} catch (e) {\n\t\treturn serializeValue(new Error(`Failed to fully serialize error: ${e?.message}\\nInner error message: ${err?.message}`));\n\t}\n}\nfunction prettifyValue(value, options) {\n\tif (typeof value !== \"string\") {\n\t\treturn format(value, getDefaultFormatOptions(options));\n\t}\n\treturn value;\n}\n\nexport { processError, serializeValue as serializeError };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;CAQA,IAAA,CAAA,QAAS,OAAa,SAAM,UACxB,OAAO,EACT,SAAS,OAAS,IAAM,EACzB;CAEA,MAAO,MAAC;CACP,IAAA,IAAM,YAAU,IAAA,aAAA,UAAA,IAAA,aAAA,UAAA,IAAA,WAAA,QAAA;EACd,MAAE,UAAW;GACX,GAAG;GACN,GAAA,IAAA;EACD;EACA,IAAI,OAAS,qBAAoB,IAAA,QAAU,IAAO,UAAC,SAAA,GAAA;EACnD,IAAI,WAAS,cAAkB,IAAA,UAAQ,OAAQ;EAChD,IAAA,SAAA,cAAA,IAAA,QAAA,OAAA;CACC;CAGA,IAAI;EACH,IAAK,CAAA,KAAI,IAAI,GAAA,KAAA,OAAA,IAAA,UAAA,UAAA;GACV,KAAC,IAAQ,GAAA;GACb,IAAA,QAAA,aAAA,IAAA,OAAA,aAAA,IAAA;EACC;CACF,QAAI,CAAA;CACH,IAAA;EACC,OAAQ,eAAE,GAAA;CACX,SAAO,GAAA;EACR,OAAA,+BAAA,IAAA,MAAA,oCAAA,GAAA,QAAA,yBAAA,KAAA,SAAA,CAAA;CACD;AACA;AACA,SAAK,cAAkB,OAAO,SAAE;CAC9B,IAAA,OAAO,UAAc,UACtB,OAAA,OAAA,OAAA,wBAAA,OAAA,CAAA;CAED,OAAA"}
@@ -0,0 +1,197 @@
1
+
2
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/helpers.js
3
+ /**
4
+ * Get original stacktrace without source map support the most performant way.
5
+ * - Create only 1 stack frame.
6
+ * - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
7
+ */
8
+ function createSimpleStackTrace(options) {
9
+ const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
10
+ const limit = Error.stackTraceLimit;
11
+ const prepareStackTrace = Error.prepareStackTrace;
12
+ Error.stackTraceLimit = stackTraceLimit;
13
+ Error.prepareStackTrace = (e) => e.stack;
14
+ const stackTrace = new Error(message).stack || "";
15
+ Error.prepareStackTrace = prepareStackTrace;
16
+ Error.stackTraceLimit = limit;
17
+ return stackTrace;
18
+ }
19
+ function notNullish(v) {
20
+ return v != null;
21
+ }
22
+ function assertTypes(value, name, types) {
23
+ const receivedType = typeof value;
24
+ if (!types.includes(receivedType)) throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
25
+ }
26
+ function isPrimitive(value) {
27
+ return value === null || typeof value !== "function" && typeof value !== "object";
28
+ }
29
+ function filterOutComments(s) {
30
+ const result = [];
31
+ let commentState = "none";
32
+ for (let i = 0; i < s.length; ++i) if (commentState === "singleline") {
33
+ if (s[i] === "\n") commentState = "none";
34
+ } else if (commentState === "multiline") {
35
+ if (s[i - 1] === "*" && s[i] === "/") commentState = "none";
36
+ } else if (commentState === "none") if (s[i] === "/" && s[i + 1] === "/") commentState = "singleline";
37
+ else if (s[i] === "/" && s[i + 1] === "*") {
38
+ commentState = "multiline";
39
+ i += 2;
40
+ } else result.push(s[i]);
41
+ return result.join("");
42
+ }
43
+ function toArray(array) {
44
+ if (array === null || array === void 0) array = [];
45
+ if (Array.isArray(array)) return array;
46
+ return [array];
47
+ }
48
+ function isObject(item) {
49
+ return item != null && typeof item === "object" && !Array.isArray(item);
50
+ }
51
+ function isFinalObj(obj) {
52
+ return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
53
+ }
54
+ function getType(value) {
55
+ return Object.prototype.toString.apply(value).slice(8, -1);
56
+ }
57
+ function collectOwnProperties(obj, collector) {
58
+ const collect = typeof collector === "function" ? collector : (key) => collector.add(key);
59
+ Object.getOwnPropertyNames(obj).forEach(collect);
60
+ Object.getOwnPropertySymbols(obj).forEach(collect);
61
+ }
62
+ function getOwnProperties(obj) {
63
+ const ownProps = /* @__PURE__ */ new Set();
64
+ if (isFinalObj(obj)) return [];
65
+ collectOwnProperties(obj, ownProps);
66
+ return Array.from(ownProps);
67
+ }
68
+ const defaultCloneOptions = { forceWritable: false };
69
+ function deepClone(val, options = defaultCloneOptions) {
70
+ return clone(val, /* @__PURE__ */ new WeakMap(), options);
71
+ }
72
+ function clone(val, seen, options = defaultCloneOptions) {
73
+ let k, out;
74
+ if (seen.has(val)) return seen.get(val);
75
+ if (Array.isArray(val)) {
76
+ out = Array.from({ length: k = val.length });
77
+ seen.set(val, out);
78
+ while (k--) out[k] = clone(val[k], seen, options);
79
+ return out;
80
+ }
81
+ if (Object.prototype.toString.call(val) === "[object Object]") {
82
+ out = Object.create(Object.getPrototypeOf(val));
83
+ seen.set(val, out);
84
+ const props = getOwnProperties(val);
85
+ for (const k of props) {
86
+ const descriptor = Object.getOwnPropertyDescriptor(val, k);
87
+ if (!descriptor) continue;
88
+ const cloned = clone(val[k], seen, options);
89
+ if (options.forceWritable) Object.defineProperty(out, k, {
90
+ enumerable: descriptor.enumerable,
91
+ configurable: true,
92
+ writable: true,
93
+ value: cloned
94
+ });
95
+ else if ("get" in descriptor) Object.defineProperty(out, k, {
96
+ ...descriptor,
97
+ get() {
98
+ return cloned;
99
+ }
100
+ });
101
+ else Object.defineProperty(out, k, {
102
+ ...descriptor,
103
+ value: cloned
104
+ });
105
+ }
106
+ return out;
107
+ }
108
+ return val;
109
+ }
110
+ function noop() {}
111
+ function objectAttr(source, path, defaultValue = void 0) {
112
+ const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
113
+ let result = source;
114
+ for (const p of paths) {
115
+ result = new Object(result)[p];
116
+ if (result === void 0) return defaultValue;
117
+ }
118
+ return result;
119
+ }
120
+ function createDefer() {
121
+ let resolve = null;
122
+ let reject = null;
123
+ const p = new Promise((_resolve, _reject) => {
124
+ resolve = _resolve;
125
+ reject = _reject;
126
+ });
127
+ p.resolve = resolve;
128
+ p.reject = reject;
129
+ return p;
130
+ }
131
+ /**
132
+ * If code starts with a function call, will return its last index, respecting arguments.
133
+ * This will return 25 - last ending character of toMatch ")"
134
+ * Also works with callbacks
135
+ * ```
136
+ * toMatch({ test: '123' });
137
+ * toBeAliased('123')
138
+ * ```
139
+ */
140
+ function getCallLastIndex(code) {
141
+ let charIndex = -1;
142
+ let inString = null;
143
+ let startedBracers = 0;
144
+ let endedBracers = 0;
145
+ let beforeChar = null;
146
+ while (charIndex <= code.length) {
147
+ beforeChar = code[charIndex];
148
+ charIndex++;
149
+ const char = code[charIndex];
150
+ if ((char === "\"" || char === "'" || char === "`") && beforeChar !== "\\") {
151
+ if (inString === char) inString = null;
152
+ else if (!inString) inString = char;
153
+ }
154
+ if (!inString) {
155
+ if (char === "(") startedBracers++;
156
+ if (char === ")") endedBracers++;
157
+ }
158
+ if (startedBracers && endedBracers && startedBracers === endedBracers) return charIndex;
159
+ }
160
+ return null;
161
+ }
162
+ function isNegativeNaN(val) {
163
+ if (!Number.isNaN(val)) return false;
164
+ const f64 = new Float64Array(1);
165
+ f64[0] = val;
166
+ return new Uint32Array(f64.buffer)[1] >>> 31 === 1;
167
+ }
168
+ function ordinal(i) {
169
+ const j = i % 10;
170
+ const k = i % 100;
171
+ if (j === 1 && k !== 11) return `${i}st`;
172
+ if (j === 2 && k !== 12) return `${i}nd`;
173
+ if (j === 3 && k !== 13) return `${i}rd`;
174
+ return `${i}th`;
175
+ }
176
+ function unique(array) {
177
+ return Array.from(new Set(array));
178
+ }
179
+
180
+ //#endregion
181
+ exports.assertTypes = assertTypes;
182
+ exports.createDefer = createDefer;
183
+ exports.createSimpleStackTrace = createSimpleStackTrace;
184
+ exports.deepClone = deepClone;
185
+ exports.filterOutComments = filterOutComments;
186
+ exports.getCallLastIndex = getCallLastIndex;
187
+ exports.getOwnProperties = getOwnProperties;
188
+ exports.getType = getType;
189
+ exports.isNegativeNaN = isNegativeNaN;
190
+ exports.isObject = isObject;
191
+ exports.isPrimitive = isPrimitive;
192
+ exports.noop = noop;
193
+ exports.notNullish = notNullish;
194
+ exports.objectAttr = objectAttr;
195
+ exports.ordinal = ordinal;
196
+ exports.toArray = toArray;
197
+ exports.unique = unique;
@@ -0,0 +1,181 @@
1
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/helpers.js
2
+ /**
3
+ * Get original stacktrace without source map support the most performant way.
4
+ * - Create only 1 stack frame.
5
+ * - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
6
+ */
7
+ function createSimpleStackTrace(options) {
8
+ const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
9
+ const limit = Error.stackTraceLimit;
10
+ const prepareStackTrace = Error.prepareStackTrace;
11
+ Error.stackTraceLimit = stackTraceLimit;
12
+ Error.prepareStackTrace = (e) => e.stack;
13
+ const stackTrace = new Error(message).stack || "";
14
+ Error.prepareStackTrace = prepareStackTrace;
15
+ Error.stackTraceLimit = limit;
16
+ return stackTrace;
17
+ }
18
+ function notNullish(v) {
19
+ return v != null;
20
+ }
21
+ function assertTypes(value, name, types) {
22
+ const receivedType = typeof value;
23
+ if (!types.includes(receivedType)) throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
24
+ }
25
+ function isPrimitive(value) {
26
+ return value === null || typeof value !== "function" && typeof value !== "object";
27
+ }
28
+ function filterOutComments(s) {
29
+ const result = [];
30
+ let commentState = "none";
31
+ for (let i = 0; i < s.length; ++i) if (commentState === "singleline") {
32
+ if (s[i] === "\n") commentState = "none";
33
+ } else if (commentState === "multiline") {
34
+ if (s[i - 1] === "*" && s[i] === "/") commentState = "none";
35
+ } else if (commentState === "none") if (s[i] === "/" && s[i + 1] === "/") commentState = "singleline";
36
+ else if (s[i] === "/" && s[i + 1] === "*") {
37
+ commentState = "multiline";
38
+ i += 2;
39
+ } else result.push(s[i]);
40
+ return result.join("");
41
+ }
42
+ function toArray(array) {
43
+ if (array === null || array === void 0) array = [];
44
+ if (Array.isArray(array)) return array;
45
+ return [array];
46
+ }
47
+ function isObject(item) {
48
+ return item != null && typeof item === "object" && !Array.isArray(item);
49
+ }
50
+ function isFinalObj(obj) {
51
+ return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
52
+ }
53
+ function getType(value) {
54
+ return Object.prototype.toString.apply(value).slice(8, -1);
55
+ }
56
+ function collectOwnProperties(obj, collector) {
57
+ const collect = typeof collector === "function" ? collector : (key) => collector.add(key);
58
+ Object.getOwnPropertyNames(obj).forEach(collect);
59
+ Object.getOwnPropertySymbols(obj).forEach(collect);
60
+ }
61
+ function getOwnProperties(obj) {
62
+ const ownProps = /* @__PURE__ */ new Set();
63
+ if (isFinalObj(obj)) return [];
64
+ collectOwnProperties(obj, ownProps);
65
+ return Array.from(ownProps);
66
+ }
67
+ const defaultCloneOptions = { forceWritable: false };
68
+ function deepClone(val, options = defaultCloneOptions) {
69
+ return clone(val, /* @__PURE__ */ new WeakMap(), options);
70
+ }
71
+ function clone(val, seen, options = defaultCloneOptions) {
72
+ let k, out;
73
+ if (seen.has(val)) return seen.get(val);
74
+ if (Array.isArray(val)) {
75
+ out = Array.from({ length: k = val.length });
76
+ seen.set(val, out);
77
+ while (k--) out[k] = clone(val[k], seen, options);
78
+ return out;
79
+ }
80
+ if (Object.prototype.toString.call(val) === "[object Object]") {
81
+ out = Object.create(Object.getPrototypeOf(val));
82
+ seen.set(val, out);
83
+ const props = getOwnProperties(val);
84
+ for (const k of props) {
85
+ const descriptor = Object.getOwnPropertyDescriptor(val, k);
86
+ if (!descriptor) continue;
87
+ const cloned = clone(val[k], seen, options);
88
+ if (options.forceWritable) Object.defineProperty(out, k, {
89
+ enumerable: descriptor.enumerable,
90
+ configurable: true,
91
+ writable: true,
92
+ value: cloned
93
+ });
94
+ else if ("get" in descriptor) Object.defineProperty(out, k, {
95
+ ...descriptor,
96
+ get() {
97
+ return cloned;
98
+ }
99
+ });
100
+ else Object.defineProperty(out, k, {
101
+ ...descriptor,
102
+ value: cloned
103
+ });
104
+ }
105
+ return out;
106
+ }
107
+ return val;
108
+ }
109
+ function noop() {}
110
+ function objectAttr(source, path, defaultValue = void 0) {
111
+ const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
112
+ let result = source;
113
+ for (const p of paths) {
114
+ result = new Object(result)[p];
115
+ if (result === void 0) return defaultValue;
116
+ }
117
+ return result;
118
+ }
119
+ function createDefer() {
120
+ let resolve = null;
121
+ let reject = null;
122
+ const p = new Promise((_resolve, _reject) => {
123
+ resolve = _resolve;
124
+ reject = _reject;
125
+ });
126
+ p.resolve = resolve;
127
+ p.reject = reject;
128
+ return p;
129
+ }
130
+ /**
131
+ * If code starts with a function call, will return its last index, respecting arguments.
132
+ * This will return 25 - last ending character of toMatch ")"
133
+ * Also works with callbacks
134
+ * ```
135
+ * toMatch({ test: '123' });
136
+ * toBeAliased('123')
137
+ * ```
138
+ */
139
+ function getCallLastIndex(code) {
140
+ let charIndex = -1;
141
+ let inString = null;
142
+ let startedBracers = 0;
143
+ let endedBracers = 0;
144
+ let beforeChar = null;
145
+ while (charIndex <= code.length) {
146
+ beforeChar = code[charIndex];
147
+ charIndex++;
148
+ const char = code[charIndex];
149
+ if ((char === "\"" || char === "'" || char === "`") && beforeChar !== "\\") {
150
+ if (inString === char) inString = null;
151
+ else if (!inString) inString = char;
152
+ }
153
+ if (!inString) {
154
+ if (char === "(") startedBracers++;
155
+ if (char === ")") endedBracers++;
156
+ }
157
+ if (startedBracers && endedBracers && startedBracers === endedBracers) return charIndex;
158
+ }
159
+ return null;
160
+ }
161
+ function isNegativeNaN(val) {
162
+ if (!Number.isNaN(val)) return false;
163
+ const f64 = new Float64Array(1);
164
+ f64[0] = val;
165
+ return new Uint32Array(f64.buffer)[1] >>> 31 === 1;
166
+ }
167
+ function ordinal(i) {
168
+ const j = i % 10;
169
+ const k = i % 100;
170
+ if (j === 1 && k !== 11) return `${i}st`;
171
+ if (j === 2 && k !== 12) return `${i}nd`;
172
+ if (j === 3 && k !== 13) return `${i}rd`;
173
+ return `${i}th`;
174
+ }
175
+ function unique(array) {
176
+ return Array.from(new Set(array));
177
+ }
178
+
179
+ //#endregion
180
+ export { assertTypes, createDefer, createSimpleStackTrace, deepClone, filterOutComments, getCallLastIndex, getOwnProperties, getType, isNegativeNaN, isObject, isPrimitive, noop, notNullish, objectAttr, ordinal, toArray, unique };
181
+ //# sourceMappingURL=helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/helpers.js"],"sourcesContent":["import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from './constants.js';\n\n// port from nanoid\n// https://github.com/ai/nanoid\nconst urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\nfunction nanoid(size = 21) {\n\tlet id = \"\";\n\tlet i = size;\n\twhile (i--) {\n\t\tid += urlAlphabet[Math.random() * 64 | 0];\n\t}\n\treturn id;\n}\n\nconst RealDate = Date;\nfunction random(seed) {\n\tconst x = Math.sin(seed++) * 1e4;\n\treturn x - Math.floor(x);\n}\nfunction shuffle(array, seed = RealDate.now()) {\n\tlet length = array.length;\n\twhile (length) {\n\t\tconst index = Math.floor(random(seed) * length--);\n\t\tconst previous = array[length];\n\t\tarray[length] = array[index];\n\t\tarray[index] = previous;\n\t\t++seed;\n\t}\n\treturn array;\n}\n\n/**\n* Get original stacktrace without source map support the most performant way.\n* - Create only 1 stack frame.\n* - Rewrite prepareStackTrace to bypass \"support-stack-trace\" (usually takes ~250ms).\n*/\nfunction createSimpleStackTrace(options) {\n\tconst { message = \"$$stack trace error\", stackTraceLimit = 1 } = options || {};\n\tconst limit = Error.stackTraceLimit;\n\tconst prepareStackTrace = Error.prepareStackTrace;\n\tError.stackTraceLimit = stackTraceLimit;\n\tError.prepareStackTrace = (e) => e.stack;\n\tconst err = new Error(message);\n\tconst stackTrace = err.stack || \"\";\n\tError.prepareStackTrace = prepareStackTrace;\n\tError.stackTraceLimit = limit;\n\treturn stackTrace;\n}\nfunction notNullish(v) {\n\treturn v != null;\n}\nfunction assertTypes(value, name, types) {\n\tconst receivedType = typeof value;\n\tconst pass = types.includes(receivedType);\n\tif (!pass) {\n\t\tthrow new TypeError(`${name} value must be ${types.join(\" or \")}, received \"${receivedType}\"`);\n\t}\n}\nfunction isPrimitive(value) {\n\treturn value === null || typeof value !== \"function\" && typeof value !== \"object\";\n}\nfunction slash(path) {\n\treturn path.replace(/\\\\/g, \"/\");\n}\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction splitFileAndPostfix(path) {\n\tconst file = cleanUrl(path);\n\treturn {\n\t\tfile,\n\t\tpostfix: path.slice(file.length)\n\t};\n}\nconst externalRE = /^(?:[a-z]+:)?\\/\\//;\nconst isExternalUrl = (url) => externalRE.test(url);\n/**\n* Prepend `/@id/` and replace null byte so the id is URL-safe.\n* This is prepended to resolved ids that are not valid browser\n* import specifiers by the importAnalysis plugin.\n*/\nfunction wrapId(id) {\n\treturn id.startsWith(VALID_ID_PREFIX) ? id : VALID_ID_PREFIX + id.replace(\"\\0\", NULL_BYTE_PLACEHOLDER);\n}\n/**\n* Undo {@link wrapId}'s `/@id/` and null byte replacements.\n*/\nfunction unwrapId(id) {\n\treturn id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, \"\\0\") : id;\n}\nfunction withTrailingSlash(path) {\n\tif (path.at(-1) !== \"/\") {\n\t\treturn `${path}/`;\n\t}\n\treturn path;\n}\nfunction filterOutComments(s) {\n\tconst result = [];\n\tlet commentState = \"none\";\n\tfor (let i = 0; i < s.length; ++i) {\n\t\tif (commentState === \"singleline\") {\n\t\t\tif (s[i] === \"\\n\") {\n\t\t\t\tcommentState = \"none\";\n\t\t\t}\n\t\t} else if (commentState === \"multiline\") {\n\t\t\tif (s[i - 1] === \"*\" && s[i] === \"/\") {\n\t\t\t\tcommentState = \"none\";\n\t\t\t}\n\t\t} else if (commentState === \"none\") {\n\t\t\tif (s[i] === \"/\" && s[i + 1] === \"/\") {\n\t\t\t\tcommentState = \"singleline\";\n\t\t\t} else if (s[i] === \"/\" && s[i + 1] === \"*\") {\n\t\t\t\tcommentState = \"multiline\";\n\t\t\t\ti += 2;\n\t\t\t} else {\n\t\t\t\tresult.push(s[i]);\n\t\t\t}\n\t\t}\n\t}\n\treturn result.join(\"\");\n}\nconst bareImportRE = /^(?![a-z]:)[\\w@](?!.*:\\/\\/)/i;\nfunction isBareImport(id) {\n\treturn bareImportRE.test(id);\n}\nfunction toArray(array) {\n\tif (array === null || array === undefined) {\n\t\tarray = [];\n\t}\n\tif (Array.isArray(array)) {\n\t\treturn array;\n\t}\n\treturn [array];\n}\nfunction isObject(item) {\n\treturn item != null && typeof item === \"object\" && !Array.isArray(item);\n}\nfunction isFinalObj(obj) {\n\treturn obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;\n}\nfunction getType(value) {\n\treturn Object.prototype.toString.apply(value).slice(8, -1);\n}\nfunction collectOwnProperties(obj, collector) {\n\tconst collect = typeof collector === \"function\" ? collector : (key) => collector.add(key);\n\tObject.getOwnPropertyNames(obj).forEach(collect);\n\tObject.getOwnPropertySymbols(obj).forEach(collect);\n}\nfunction getOwnProperties(obj) {\n\tconst ownProps = new Set();\n\tif (isFinalObj(obj)) {\n\t\treturn [];\n\t}\n\tcollectOwnProperties(obj, ownProps);\n\treturn Array.from(ownProps);\n}\nconst defaultCloneOptions = { forceWritable: false };\nfunction deepClone(val, options = defaultCloneOptions) {\n\tconst seen = new WeakMap();\n\treturn clone(val, seen, options);\n}\nfunction clone(val, seen, options = defaultCloneOptions) {\n\tlet k, out;\n\tif (seen.has(val)) {\n\t\treturn seen.get(val);\n\t}\n\tif (Array.isArray(val)) {\n\t\tout = Array.from({ length: k = val.length });\n\t\tseen.set(val, out);\n\t\twhile (k--) {\n\t\t\tout[k] = clone(val[k], seen, options);\n\t\t}\n\t\treturn out;\n\t}\n\tif (Object.prototype.toString.call(val) === \"[object Object]\") {\n\t\tout = Object.create(Object.getPrototypeOf(val));\n\t\tseen.set(val, out);\n\t\t// we don't need properties from prototype\n\t\tconst props = getOwnProperties(val);\n\t\tfor (const k of props) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(val, k);\n\t\t\tif (!descriptor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst cloned = clone(val[k], seen, options);\n\t\t\tif (options.forceWritable) {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\tenumerable: descriptor.enumerable,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: cloned\n\t\t\t\t});\n\t\t\t} else if (\"get\" in descriptor) {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\t...descriptor,\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn cloned;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tObject.defineProperty(out, k, {\n\t\t\t\t\t...descriptor,\n\t\t\t\t\tvalue: cloned\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\treturn val;\n}\nfunction noop() {}\nfunction objectAttr(source, path, defaultValue = undefined) {\n\t// a[3].b -> a.3.b\n\tconst paths = path.replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\");\n\tlet result = source;\n\tfor (const p of paths) {\n\t\tresult = new Object(result)[p];\n\t\tif (result === undefined) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\treturn result;\n}\nfunction createDefer() {\n\tlet resolve = null;\n\tlet reject = null;\n\tconst p = new Promise((_resolve, _reject) => {\n\t\tresolve = _resolve;\n\t\treject = _reject;\n\t});\n\tp.resolve = resolve;\n\tp.reject = reject;\n\treturn p;\n}\n/**\n* If code starts with a function call, will return its last index, respecting arguments.\n* This will return 25 - last ending character of toMatch \")\"\n* Also works with callbacks\n* ```\n* toMatch({ test: '123' });\n* toBeAliased('123')\n* ```\n*/\nfunction getCallLastIndex(code) {\n\tlet charIndex = -1;\n\tlet inString = null;\n\tlet startedBracers = 0;\n\tlet endedBracers = 0;\n\tlet beforeChar = null;\n\twhile (charIndex <= code.length) {\n\t\tbeforeChar = code[charIndex];\n\t\tcharIndex++;\n\t\tconst char = code[charIndex];\n\t\tconst isCharString = char === \"\\\"\" || char === \"'\" || char === \"`\";\n\t\tif (isCharString && beforeChar !== \"\\\\\") {\n\t\t\tif (inString === char) {\n\t\t\t\tinString = null;\n\t\t\t} else if (!inString) {\n\t\t\t\tinString = char;\n\t\t\t}\n\t\t}\n\t\tif (!inString) {\n\t\t\tif (char === \"(\") {\n\t\t\t\tstartedBracers++;\n\t\t\t}\n\t\t\tif (char === \")\") {\n\t\t\t\tendedBracers++;\n\t\t\t}\n\t\t}\n\t\tif (startedBracers && endedBracers && startedBracers === endedBracers) {\n\t\t\treturn charIndex;\n\t\t}\n\t}\n\treturn null;\n}\nfunction isNegativeNaN(val) {\n\tif (!Number.isNaN(val)) {\n\t\treturn false;\n\t}\n\tconst f64 = new Float64Array(1);\n\tf64[0] = val;\n\tconst u32 = new Uint32Array(f64.buffer);\n\tconst isNegative = u32[1] >>> 31 === 1;\n\treturn isNegative;\n}\nfunction toString(v) {\n\treturn Object.prototype.toString.call(v);\n}\nfunction isPlainObject(val) {\n\treturn toString(val) === \"[object Object]\" && (!val.constructor || val.constructor.name === \"Object\");\n}\nfunction isMergeableObject(item) {\n\treturn isPlainObject(item) && !Array.isArray(item);\n}\nfunction ordinal(i) {\n\tconst j = i % 10;\n\tconst k = i % 100;\n\tif (j === 1 && k !== 11) {\n\t\treturn `${i}st`;\n\t}\n\tif (j === 2 && k !== 12) {\n\t\treturn `${i}nd`;\n\t}\n\tif (j === 3 && k !== 13) {\n\t\treturn `${i}rd`;\n\t}\n\treturn `${i}th`;\n}\n/**\n* Deep merge :P\n*\n* Will merge objects only if they are plain\n*\n* Do not merge types - it is very expensive and usually it's better to case a type here\n*/\nfunction deepMerge(target, ...sources) {\n\tif (!sources.length) {\n\t\treturn target;\n\t}\n\tconst source = sources.shift();\n\tif (source === undefined) {\n\t\treturn target;\n\t}\n\tif (isMergeableObject(target) && isMergeableObject(source)) {\n\t\tObject.keys(source).forEach((key) => {\n\t\t\tconst _source = source;\n\t\t\tif (isMergeableObject(_source[key])) {\n\t\t\t\tif (!target[key]) {\n\t\t\t\t\ttarget[key] = {};\n\t\t\t\t}\n\t\t\t\tdeepMerge(target[key], _source[key]);\n\t\t\t} else {\n\t\t\t\ttarget[key] = _source[key];\n\t\t\t}\n\t\t});\n\t}\n\treturn deepMerge(target, ...sources);\n}\nfunction unique(array) {\n\treturn Array.from(new Set(array));\n}\n\nexport { assertTypes, cleanUrl, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, filterOutComments, getCallLastIndex, getOwnProperties, getType, isBareImport, isExternalUrl, isNegativeNaN, isObject, isPrimitive, nanoid, noop, notNullish, objectAttr, ordinal, shuffle, slash, splitFileAndPostfix, toArray, unique, unwrapId, withTrailingSlash, wrapId };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAmCA,SAAC,uBAAA,SAAA;CACD,MAAQ,EACP,UAAQ,uBACR,kBAAoB,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ACA,IAAQ,kBAAkB,gBAAE,mBAAA,cACtB,OAAO;CAEZ;CACA,OAAM;AACP;AACA,SAAO,cAAU,KAAW;CAC3B,IAAK,CAAC,OAAA,MAAa,GAAG,GACtB,OAAO;CAER,MAAQ,MAAC,IAAS,aAAG,CAAA;CACpB,IAAA,KAAO;CAGP,OADQ,IADT,YAAA,IAAA,MACuB,EAAA,OAAK,OAAA;AAE5B;AAUA,SAAS,QAAQ,GAAG;CAClB,MAAM,IAAI,IAAI;CACf,MAAA,IAAA,IAAA;CACA,IAAK,MAAM,KAAK,MAAK,IACpB,OAAS,GAAG,EAAE;CAEf,IAAA,MAAW,KAAI,MAAA,IAChB,OAAA,GAAA,EAAA;CAEE,IAAI,MAAM,KAAE,MAAA,IACd,OAAA,GAAA,EAAA;CAEA,OAAA,GAAA,EAAA;AACA"}
@@ -0,0 +1,29 @@
1
+
2
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/offset.js
3
+ const lineSplitRE = /\r?\n/;
4
+ function positionToOffset(source, lineNumber, columnNumber) {
5
+ const lines = source.split(lineSplitRE);
6
+ const nl = /\r\n/.test(source) ? 2 : 1;
7
+ let start = 0;
8
+ if (lineNumber > lines.length) return source.length;
9
+ for (let i = 0; i < lineNumber - 1; i++) start += lines[i].length + nl;
10
+ return start + columnNumber;
11
+ }
12
+ function offsetToLineNumber(source, offset) {
13
+ if (offset > source.length) throw new Error(`offset is longer than source length! offset ${offset} > length ${source.length}`);
14
+ const lines = source.split(lineSplitRE);
15
+ const nl = /\r\n/.test(source) ? 2 : 1;
16
+ let counted = 0;
17
+ let line = 0;
18
+ for (; line < lines.length; line++) {
19
+ const lineLength = lines[line].length + nl;
20
+ if (counted + lineLength >= offset) break;
21
+ counted += lineLength;
22
+ }
23
+ return line + 1;
24
+ }
25
+
26
+ //#endregion
27
+ exports.lineSplitRE = lineSplitRE;
28
+ exports.offsetToLineNumber = offsetToLineNumber;
29
+ exports.positionToOffset = positionToOffset;
@@ -0,0 +1,27 @@
1
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/offset.js
2
+ const lineSplitRE = /\r?\n/;
3
+ function positionToOffset(source, lineNumber, columnNumber) {
4
+ const lines = source.split(lineSplitRE);
5
+ const nl = /\r\n/.test(source) ? 2 : 1;
6
+ let start = 0;
7
+ if (lineNumber > lines.length) return source.length;
8
+ for (let i = 0; i < lineNumber - 1; i++) start += lines[i].length + nl;
9
+ return start + columnNumber;
10
+ }
11
+ function offsetToLineNumber(source, offset) {
12
+ if (offset > source.length) throw new Error(`offset is longer than source length! offset ${offset} > length ${source.length}`);
13
+ const lines = source.split(lineSplitRE);
14
+ const nl = /\r\n/.test(source) ? 2 : 1;
15
+ let counted = 0;
16
+ let line = 0;
17
+ for (; line < lines.length; line++) {
18
+ const lineLength = lines[line].length + nl;
19
+ if (counted + lineLength >= offset) break;
20
+ counted += lineLength;
21
+ }
22
+ return line + 1;
23
+ }
24
+
25
+ //#endregion
26
+ export { lineSplitRE, offsetToLineNumber, positionToOffset };
27
+ //# sourceMappingURL=offset.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offset.mjs","names":[],"sources":["../../../../../../../../../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/offset.js"],"sourcesContent":["const lineSplitRE = /\\r?\\n/;\nfunction positionToOffset(source, lineNumber, columnNumber) {\n\tconst lines = source.split(lineSplitRE);\n\tconst nl = /\\r\\n/.test(source) ? 2 : 1;\n\tlet start = 0;\n\tif (lineNumber > lines.length) {\n\t\treturn source.length;\n\t}\n\tfor (let i = 0; i < lineNumber - 1; i++) {\n\t\tstart += lines[i].length + nl;\n\t}\n\treturn start + columnNumber;\n}\nfunction offsetToLineNumber(source, offset) {\n\tif (offset > source.length) {\n\t\tthrow new Error(`offset is longer than source length! offset ${offset} > length ${source.length}`);\n\t}\n\tconst lines = source.split(lineSplitRE);\n\tconst nl = /\\r\\n/.test(source) ? 2 : 1;\n\tlet counted = 0;\n\tlet line = 0;\n\tfor (; line < lines.length; line++) {\n\t\tconst lineLength = lines[line].length + nl;\n\t\tif (counted + lineLength >= offset) {\n\t\t\tbreak;\n\t\t}\n\t\tcounted += lineLength;\n\t}\n\treturn line + 1;\n}\n\nexport { lineSplitRE, offsetToLineNumber, positionToOffset };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,cAAc;AACpB,SAAS,iBAAiB,QAAQ,YAAY,cAAc;CAC3D,MAAM,QAAQ,OAAO,MAAM,WAAY;CACvC,MAAM,KAAM,OAAM,KAAK,MAAO,IAAI,IAAI;CACtC,IAAI,QAAS;CACb,IAAI,aAAa,MAAM,QACtB,OAAO,OAAO;CAEf,KAAK,IAAK,IAAI,GAAG,IAAG,aAAc,GAAG,KACpC,SAAS,MAAQ,GAAC,SAAW;CAE9B,OAAO,QAAQ;AAChB;AACA,SAAS,mBAAmB,QAAQ,QAAQ;CAC3C,IAAI,SAAS,OAAO,QACnB,MAAM,IAAI,MAAO,+CAA8C,OAAS,YAAU,OAAO,QAAS;CAEnG,MAAM,QAAQ,OAAO,MAAM,WAAY;CACvC,MAAM,KAAM,OAAM,KAAK,MAAO,IAAI,IAAI;CACtC,IAAI,UAAW;CACf,IAAI,OAAQ;CACZ,OAAO,OAAO,MAAM,QAAQ,QAAQ;EACnC,MAAM,aAAa,MAAM,MAAM,SAAW;EACxC,IAAE,UAAU,cAAc,QAC3B;EAED,WAAW;CACZ;CACA,OAAO,OAAQ;AAChB"}
@@ -0,0 +1,77 @@
1
+
2
+ //#region ../../../node_modules/.pnpm/@vitest+utils@4.1.7/node_modules/@vitest/utils/dist/serialize.js
3
+ const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
4
+ const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
5
+ function isImmutable(v) {
6
+ return v && (v[IS_COLLECTION_SYMBOL] || v[IS_RECORD_SYMBOL]);
7
+ }
8
+ const OBJECT_PROTO = Object.getPrototypeOf({});
9
+ function getUnserializableMessage(err) {
10
+ if (err instanceof Error) return `<unserializable>: ${err.message}`;
11
+ if (typeof err === "string") return `<unserializable>: ${err}`;
12
+ return "<unserializable>";
13
+ }
14
+ function serializeValue(val, seen = /* @__PURE__ */ new WeakMap()) {
15
+ if (!val || typeof val === "string") return val;
16
+ if (val instanceof Error && "toJSON" in val && typeof val.toJSON === "function") {
17
+ const jsonValue = val.toJSON();
18
+ if (jsonValue && jsonValue !== val && typeof jsonValue === "object") {
19
+ if (typeof val.message === "string") safe(() => jsonValue.message ??= normalizeErrorMessage(val.message));
20
+ if (typeof val.stack === "string") safe(() => jsonValue.stack ??= val.stack);
21
+ if (typeof val.name === "string") safe(() => jsonValue.name ??= val.name);
22
+ if (val.cause != null) safe(() => jsonValue.cause ??= serializeValue(val.cause, seen));
23
+ }
24
+ return serializeValue(jsonValue, seen);
25
+ }
26
+ if (typeof val === "function") return `Function<${val.name || "anonymous"}>`;
27
+ if (typeof val === "symbol") return val.toString();
28
+ if (typeof val !== "object") return val;
29
+ if (typeof Buffer !== "undefined" && val instanceof Buffer) return `<Buffer(${val.length}) ...>`;
30
+ if (typeof Uint8Array !== "undefined" && val instanceof Uint8Array) return `<Uint8Array(${val.length}) ...>`;
31
+ if (isImmutable(val)) return serializeValue(val.toJSON(), seen);
32
+ if (val instanceof Promise || val.constructor && val.constructor.prototype === "AsyncFunction") return "Promise";
33
+ if (typeof Element !== "undefined" && val instanceof Element) return val.tagName;
34
+ if (typeof val.toJSON === "function") return serializeValue(val.toJSON(), seen);
35
+ if (seen.has(val)) return seen.get(val);
36
+ if (Array.isArray(val)) {
37
+ const clone = new Array(val.length);
38
+ seen.set(val, clone);
39
+ val.forEach((e, i) => {
40
+ try {
41
+ clone[i] = serializeValue(e, seen);
42
+ } catch (err) {
43
+ clone[i] = getUnserializableMessage(err);
44
+ }
45
+ });
46
+ return clone;
47
+ } else {
48
+ const clone = Object.create(null);
49
+ seen.set(val, clone);
50
+ let obj = val;
51
+ while (obj && obj !== OBJECT_PROTO) {
52
+ Object.getOwnPropertyNames(obj).forEach((key) => {
53
+ if (key in clone) return;
54
+ try {
55
+ clone[key] = serializeValue(val[key], seen);
56
+ } catch (err) {
57
+ delete clone[key];
58
+ clone[key] = getUnserializableMessage(err);
59
+ }
60
+ });
61
+ obj = Object.getPrototypeOf(obj);
62
+ }
63
+ if (val instanceof Error) safe(() => clone.message = normalizeErrorMessage(val.message));
64
+ return clone;
65
+ }
66
+ }
67
+ function safe(fn) {
68
+ try {
69
+ return fn();
70
+ } catch {}
71
+ }
72
+ function normalizeErrorMessage(message) {
73
+ return message.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/getByTestId('__vitest_\d+__')/g, "page");
74
+ }
75
+
76
+ //#endregion
77
+ exports.serializeValue = serializeValue;