@manifest-network/manifest-mcp-core 0.1.0

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 (237) hide show
  1. package/dist/__test-utils__/callTool.d.ts +29 -0
  2. package/dist/__test-utils__/callTool.d.ts.map +1 -0
  3. package/dist/__test-utils__/callTool.js +45 -0
  4. package/dist/__test-utils__/callTool.js.map +1 -0
  5. package/dist/__test-utils__/mocks.d.ts +125 -0
  6. package/dist/__test-utils__/mocks.d.ts.map +1 -0
  7. package/dist/__test-utils__/mocks.js +146 -0
  8. package/dist/__test-utils__/mocks.js.map +1 -0
  9. package/dist/client.d.ts +67 -0
  10. package/dist/client.d.ts.map +1 -0
  11. package/dist/client.js +209 -0
  12. package/dist/client.js.map +1 -0
  13. package/dist/config.d.ts +30 -0
  14. package/dist/config.d.ts.map +1 -0
  15. package/dist/config.js +127 -0
  16. package/dist/config.js.map +1 -0
  17. package/dist/cosmos.d.ts +24 -0
  18. package/dist/cosmos.d.ts.map +1 -0
  19. package/dist/cosmos.js +85 -0
  20. package/dist/cosmos.js.map +1 -0
  21. package/dist/index.d.ts +19 -0
  22. package/dist/index.js +20 -0
  23. package/dist/lcd-adapter.d.ts +15 -0
  24. package/dist/lcd-adapter.d.ts.map +1 -0
  25. package/dist/lcd-adapter.js +98 -0
  26. package/dist/lcd-adapter.js.map +1 -0
  27. package/dist/logger.d.ts +20 -0
  28. package/dist/logger.d.ts.map +1 -0
  29. package/dist/logger.js +43 -0
  30. package/dist/logger.js.map +1 -0
  31. package/dist/modules.d.ts +63 -0
  32. package/dist/modules.d.ts.map +1 -0
  33. package/dist/modules.js +759 -0
  34. package/dist/modules.js.map +1 -0
  35. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
  36. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
  37. package/dist/node_modules/@vitest/expect/dist/index.d.ts +802 -0
  38. package/dist/node_modules/@vitest/expect/dist/index.d.ts.map +1 -0
  39. package/dist/node_modules/@vitest/expect/dist/index.js +1457 -0
  40. package/dist/node_modules/@vitest/expect/dist/index.js.map +1 -0
  41. package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts +95 -0
  42. package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts.map +1 -0
  43. package/dist/node_modules/@vitest/pretty-format/dist/index.js +877 -0
  44. package/dist/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
  45. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js +91 -0
  46. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
  47. package/dist/node_modules/@vitest/runner/dist/index.js +1381 -0
  48. package/dist/node_modules/@vitest/runner/dist/index.js.map +1 -0
  49. package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts +540 -0
  50. package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts.map +1 -0
  51. package/dist/node_modules/@vitest/runner/dist/utils.js +1 -0
  52. package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts +16 -0
  53. package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts.map +1 -0
  54. package/dist/node_modules/@vitest/snapshot/dist/index.d.ts +89 -0
  55. package/dist/node_modules/@vitest/snapshot/dist/index.d.ts.map +1 -0
  56. package/dist/node_modules/@vitest/snapshot/dist/index.js +649 -0
  57. package/dist/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
  58. package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts +40 -0
  59. package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts.map +1 -0
  60. package/dist/node_modules/@vitest/spy/dist/index.d.ts +343 -0
  61. package/dist/node_modules/@vitest/spy/dist/index.d.ts.map +1 -0
  62. package/dist/node_modules/@vitest/spy/dist/index.js +386 -0
  63. package/dist/node_modules/@vitest/spy/dist/index.js.map +1 -0
  64. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +82 -0
  65. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js.map +1 -0
  66. package/dist/node_modules/@vitest/utils/dist/diff.d.ts +14 -0
  67. package/dist/node_modules/@vitest/utils/dist/diff.d.ts.map +1 -0
  68. package/dist/node_modules/@vitest/utils/dist/diff.js +1297 -0
  69. package/dist/node_modules/@vitest/utils/dist/diff.js.map +1 -0
  70. package/dist/node_modules/@vitest/utils/dist/display.d.ts +15 -0
  71. package/dist/node_modules/@vitest/utils/dist/display.d.ts.map +1 -0
  72. package/dist/node_modules/@vitest/utils/dist/display.js +558 -0
  73. package/dist/node_modules/@vitest/utils/dist/display.js.map +1 -0
  74. package/dist/node_modules/@vitest/utils/dist/error.js +30 -0
  75. package/dist/node_modules/@vitest/utils/dist/error.js.map +1 -0
  76. package/dist/node_modules/@vitest/utils/dist/helpers.js +181 -0
  77. package/dist/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
  78. package/dist/node_modules/@vitest/utils/dist/offset.js +27 -0
  79. package/dist/node_modules/@vitest/utils/dist/offset.js.map +1 -0
  80. package/dist/node_modules/@vitest/utils/dist/serialize.js +77 -0
  81. package/dist/node_modules/@vitest/utils/dist/serialize.js.map +1 -0
  82. package/dist/node_modules/@vitest/utils/dist/source-map.js +367 -0
  83. package/dist/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
  84. package/dist/node_modules/@vitest/utils/dist/timers.js +37 -0
  85. package/dist/node_modules/@vitest/utils/dist/timers.js.map +1 -0
  86. package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts +38 -0
  87. package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts.map +1 -0
  88. package/dist/node_modules/@vitest/utils/dist/types.d.ts +25 -0
  89. package/dist/node_modules/@vitest/utils/dist/types.d.ts.map +1 -0
  90. package/dist/node_modules/chai/index.js +2875 -0
  91. package/dist/node_modules/chai/index.js.map +1 -0
  92. package/dist/node_modules/magic-string/dist/magic-string.es.js +939 -0
  93. package/dist/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
  94. package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +85 -0
  95. package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js.map +1 -0
  96. package/dist/node_modules/tinybench/dist/index.d.ts +91 -0
  97. package/dist/node_modules/tinybench/dist/index.d.ts.map +1 -0
  98. package/dist/node_modules/tinyrainbow/dist/index.d.ts +9 -0
  99. package/dist/node_modules/tinyrainbow/dist/index.d.ts.map +1 -0
  100. package/dist/node_modules/tinyrainbow/dist/index.js +86 -0
  101. package/dist/node_modules/tinyrainbow/dist/index.js.map +1 -0
  102. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
  103. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js.map +1 -0
  104. package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js +41 -0
  105. package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js.map +1 -0
  106. package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts +12 -0
  107. package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts.map +1 -0
  108. package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts +100 -0
  109. package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts.map +1 -0
  110. package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +57 -0
  111. package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js.map +1 -0
  112. package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts +13 -0
  113. package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts.map +1 -0
  114. package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js +2791 -0
  115. package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js.map +1 -0
  116. package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +44 -0
  117. package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js.map +1 -0
  118. package/dist/node_modules/vitest/dist/index.d.ts +9 -0
  119. package/dist/queries/auth.d.ts +15 -0
  120. package/dist/queries/auth.d.ts.map +1 -0
  121. package/dist/queries/auth.js +58 -0
  122. package/dist/queries/auth.js.map +1 -0
  123. package/dist/queries/bank.d.ts +15 -0
  124. package/dist/queries/bank.d.ts.map +1 -0
  125. package/dist/queries/bank.js +93 -0
  126. package/dist/queries/bank.js.map +1 -0
  127. package/dist/queries/billing.d.ts +15 -0
  128. package/dist/queries/billing.d.ts.map +1 -0
  129. package/dist/queries/billing.js +114 -0
  130. package/dist/queries/billing.js.map +1 -0
  131. package/dist/queries/distribution.d.ts +15 -0
  132. package/dist/queries/distribution.d.ts.map +1 -0
  133. package/dist/queries/distribution.js +73 -0
  134. package/dist/queries/distribution.js.map +1 -0
  135. package/dist/queries/gov.d.ts +15 -0
  136. package/dist/queries/gov.d.ts.map +1 -0
  137. package/dist/queries/gov.js +98 -0
  138. package/dist/queries/gov.js.map +1 -0
  139. package/dist/queries/group.d.ts +15 -0
  140. package/dist/queries/group.d.ts.map +1 -0
  141. package/dist/queries/group.js +159 -0
  142. package/dist/queries/group.js.map +1 -0
  143. package/dist/queries/index.d.ts +10 -0
  144. package/dist/queries/index.js +10 -0
  145. package/dist/queries/sku.d.ts +16 -0
  146. package/dist/queries/sku.d.ts.map +1 -0
  147. package/dist/queries/sku.js +85 -0
  148. package/dist/queries/sku.js.map +1 -0
  149. package/dist/queries/staking.d.ts +15 -0
  150. package/dist/queries/staking.d.ts.map +1 -0
  151. package/dist/queries/staking.js +127 -0
  152. package/dist/queries/staking.js.map +1 -0
  153. package/dist/queries/utils.d.ts +54 -0
  154. package/dist/queries/utils.d.ts.map +1 -0
  155. package/dist/queries/utils.js +74 -0
  156. package/dist/queries/utils.js.map +1 -0
  157. package/dist/retry.d.ts +48 -0
  158. package/dist/retry.d.ts.map +1 -0
  159. package/dist/retry.js +106 -0
  160. package/dist/retry.js.map +1 -0
  161. package/dist/server-utils.d.ts +61 -0
  162. package/dist/server-utils.d.ts.map +1 -0
  163. package/dist/server-utils.js +156 -0
  164. package/dist/server-utils.js.map +1 -0
  165. package/dist/tools/fundCredits.d.ts +8 -0
  166. package/dist/tools/fundCredits.d.ts.map +1 -0
  167. package/dist/tools/fundCredits.js +9 -0
  168. package/dist/tools/fundCredits.js.map +1 -0
  169. package/dist/tools/getBalance.d.ts +26 -0
  170. package/dist/tools/getBalance.d.ts.map +1 -0
  171. package/dist/tools/getBalance.js +59 -0
  172. package/dist/tools/getBalance.js.map +1 -0
  173. package/dist/tools/stopApp.d.ts +13 -0
  174. package/dist/tools/stopApp.d.ts.map +1 -0
  175. package/dist/tools/stopApp.js +15 -0
  176. package/dist/tools/stopApp.js.map +1 -0
  177. package/dist/transactions/bank.d.ts +11 -0
  178. package/dist/transactions/bank.d.ts.map +1 -0
  179. package/dist/transactions/bank.js +75 -0
  180. package/dist/transactions/bank.js.map +1 -0
  181. package/dist/transactions/billing.d.ts +11 -0
  182. package/dist/transactions/billing.d.ts.map +1 -0
  183. package/dist/transactions/billing.js +189 -0
  184. package/dist/transactions/billing.js.map +1 -0
  185. package/dist/transactions/distribution.d.ts +11 -0
  186. package/dist/transactions/distribution.d.ts.map +1 -0
  187. package/dist/transactions/distribution.js +60 -0
  188. package/dist/transactions/distribution.js.map +1 -0
  189. package/dist/transactions/gov.d.ts +11 -0
  190. package/dist/transactions/gov.d.ts.map +1 -0
  191. package/dist/transactions/gov.js +108 -0
  192. package/dist/transactions/gov.js.map +1 -0
  193. package/dist/transactions/group.d.ts +11 -0
  194. package/dist/transactions/group.d.ts.map +1 -0
  195. package/dist/transactions/group.js +347 -0
  196. package/dist/transactions/group.js.map +1 -0
  197. package/dist/transactions/index.d.ts +10 -0
  198. package/dist/transactions/index.js +10 -0
  199. package/dist/transactions/manifest.d.ts +11 -0
  200. package/dist/transactions/manifest.d.ts.map +1 -0
  201. package/dist/transactions/manifest.js +59 -0
  202. package/dist/transactions/manifest.js.map +1 -0
  203. package/dist/transactions/sku.d.ts +11 -0
  204. package/dist/transactions/sku.d.ts.map +1 -0
  205. package/dist/transactions/sku.js +191 -0
  206. package/dist/transactions/sku.js.map +1 -0
  207. package/dist/transactions/staking.d.ts +11 -0
  208. package/dist/transactions/staking.d.ts.map +1 -0
  209. package/dist/transactions/staking.js +79 -0
  210. package/dist/transactions/staking.js.map +1 -0
  211. package/dist/transactions/utils.d.ts +161 -0
  212. package/dist/transactions/utils.d.ts.map +1 -0
  213. package/dist/transactions/utils.js +272 -0
  214. package/dist/transactions/utils.js.map +1 -0
  215. package/dist/types.d.ts +390 -0
  216. package/dist/types.d.ts.map +1 -0
  217. package/dist/types.js +45 -0
  218. package/dist/types.js.map +1 -0
  219. package/dist/validation.d.ts +30 -0
  220. package/dist/validation.d.ts.map +1 -0
  221. package/dist/validation.js +53 -0
  222. package/dist/validation.js.map +1 -0
  223. package/dist/version.d.ts +5 -0
  224. package/dist/version.d.ts.map +1 -0
  225. package/dist/version.js +6 -0
  226. package/dist/version.js.map +1 -0
  227. package/dist/wallet/index.d.ts +4 -0
  228. package/dist/wallet/index.js +3 -0
  229. package/dist/wallet/mnemonic.d.ts +47 -0
  230. package/dist/wallet/mnemonic.d.ts.map +1 -0
  231. package/dist/wallet/mnemonic.js +97 -0
  232. package/dist/wallet/mnemonic.js.map +1 -0
  233. package/dist/wallet/sign-arbitrary.d.ts +12 -0
  234. package/dist/wallet/sign-arbitrary.d.ts.map +1 -0
  235. package/dist/wallet/sign-arbitrary.js +36 -0
  236. package/dist/wallet/sign-arbitrary.js.map +1 -0
  237. package/package.json +72 -0
@@ -0,0 +1,877 @@
1
+ import { y } from "../../../tinyrainbow/dist/index.js";
2
+ //#region ../../node_modules/@vitest/pretty-format/dist/index.js
3
+ function _mergeNamespaces(n, m) {
4
+ m.forEach(function(e) {
5
+ e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
6
+ if (k !== "default" && !(k in n)) {
7
+ var d = Object.getOwnPropertyDescriptor(e, k);
8
+ Object.defineProperty(n, k, d.get ? d : {
9
+ enumerable: true,
10
+ get: function() {
11
+ return e[k];
12
+ }
13
+ });
14
+ }
15
+ });
16
+ });
17
+ return Object.freeze(n);
18
+ }
19
+ function getKeysOfEnumerableProperties(object, compareKeys) {
20
+ const rawKeys = Object.keys(object);
21
+ const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
22
+ if (Object.getOwnPropertySymbols) {
23
+ for (const symbol of Object.getOwnPropertySymbols(object)) if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) keys.push(symbol);
24
+ }
25
+ return keys;
26
+ }
27
+ /**
28
+ * Return entries (for example, of a map)
29
+ * with spacing, indentation, and comma
30
+ * without surrounding punctuation (for example, braces)
31
+ */
32
+ function printIteratorEntries(iterator, config, indentation, depth, refs, printer, separator = ": ") {
33
+ let result = "";
34
+ let width = 0;
35
+ let current = iterator.next();
36
+ if (!current.done) {
37
+ result += config.spacingOuter;
38
+ const indentationNext = indentation + config.indent;
39
+ while (!current.done) {
40
+ result += indentationNext;
41
+ if (width++ === config.maxWidth) {
42
+ result += "…";
43
+ break;
44
+ }
45
+ const name = printer(current.value[0], config, indentationNext, depth, refs);
46
+ const value = printer(current.value[1], config, indentationNext, depth, refs);
47
+ result += name + separator + value;
48
+ current = iterator.next();
49
+ if (!current.done) result += `,${config.spacingInner}`;
50
+ else if (!config.min) result += ",";
51
+ }
52
+ result += config.spacingOuter + indentation;
53
+ }
54
+ return result;
55
+ }
56
+ /**
57
+ * Return values (for example, of a set)
58
+ * with spacing, indentation, and comma
59
+ * without surrounding punctuation (braces or brackets)
60
+ */
61
+ function printIteratorValues(iterator, config, indentation, depth, refs, printer) {
62
+ let result = "";
63
+ let width = 0;
64
+ let current = iterator.next();
65
+ if (!current.done) {
66
+ result += config.spacingOuter;
67
+ const indentationNext = indentation + config.indent;
68
+ while (!current.done) {
69
+ result += indentationNext;
70
+ if (width++ === config.maxWidth) {
71
+ result += "…";
72
+ break;
73
+ }
74
+ result += printer(current.value, config, indentationNext, depth, refs);
75
+ current = iterator.next();
76
+ if (!current.done) result += `,${config.spacingInner}`;
77
+ else if (!config.min) result += ",";
78
+ }
79
+ result += config.spacingOuter + indentation;
80
+ }
81
+ return result;
82
+ }
83
+ /**
84
+ * Return items (for example, of an array)
85
+ * with spacing, indentation, and comma
86
+ * without surrounding punctuation (for example, brackets)
87
+ */
88
+ function printListItems(list, config, indentation, depth, refs, printer) {
89
+ let result = "";
90
+ list = list instanceof ArrayBuffer ? new DataView(list) : list;
91
+ const isDataView = (l) => l instanceof DataView;
92
+ const length = isDataView(list) ? list.byteLength : list.length;
93
+ if (length > 0) {
94
+ result += config.spacingOuter;
95
+ const indentationNext = indentation + config.indent;
96
+ for (let i = 0; i < length; i++) {
97
+ result += indentationNext;
98
+ if (i === config.maxWidth) {
99
+ result += "…";
100
+ break;
101
+ }
102
+ if (isDataView(list) || i in list) result += printer(isDataView(list) ? list.getInt8(i) : list[i], config, indentationNext, depth, refs);
103
+ if (i < length - 1) result += `,${config.spacingInner}`;
104
+ else if (!config.min) result += ",";
105
+ }
106
+ result += config.spacingOuter + indentation;
107
+ }
108
+ return result;
109
+ }
110
+ /**
111
+ * Return properties of an object
112
+ * with spacing, indentation, and comma
113
+ * without surrounding punctuation (for example, braces)
114
+ */
115
+ function printObjectProperties(val, config, indentation, depth, refs, printer) {
116
+ let result = "";
117
+ const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
118
+ if (keys.length > 0) {
119
+ result += config.spacingOuter;
120
+ const indentationNext = indentation + config.indent;
121
+ for (let i = 0; i < keys.length; i++) {
122
+ const key = keys[i];
123
+ const name = printer(key, config, indentationNext, depth, refs);
124
+ const value = printer(val[key], config, indentationNext, depth, refs);
125
+ result += `${indentationNext + name}: ${value}`;
126
+ if (i < keys.length - 1) result += `,${config.spacingInner}`;
127
+ else if (!config.min) result += ",";
128
+ }
129
+ result += config.spacingOuter + indentation;
130
+ }
131
+ return result;
132
+ }
133
+ const asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621;
134
+ const SPACE$2 = " ";
135
+ const serialize$5 = (val, config, indentation, depth, refs, printer) => {
136
+ const stringedValue = val.toString();
137
+ if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
138
+ if (++depth > config.maxDepth) return `[${stringedValue}]`;
139
+ return `${stringedValue + SPACE$2}[${printListItems(val.sample, config, indentation, depth, refs, printer)}]`;
140
+ }
141
+ if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
142
+ if (++depth > config.maxDepth) return `[${stringedValue}]`;
143
+ return `${stringedValue + SPACE$2}{${printObjectProperties(val.sample, config, indentation, depth, refs, printer)}}`;
144
+ }
145
+ if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") return stringedValue + SPACE$2 + printer(val.sample, config, indentation, depth, refs);
146
+ if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") return stringedValue + SPACE$2 + printer(val.sample, config, indentation, depth, refs);
147
+ if (typeof val.toAsymmetricMatcher !== "function") throw new TypeError(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`);
148
+ return val.toAsymmetricMatcher();
149
+ };
150
+ const test$5 = (val) => val && val.$$typeof === asymmetricMatcher;
151
+ const plugin$5 = {
152
+ serialize: serialize$5,
153
+ test: test$5
154
+ };
155
+ const SPACE$1 = " ";
156
+ const OBJECT_NAMES = new Set(["DOMStringMap", "NamedNodeMap"]);
157
+ const ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/;
158
+ function testName(name) {
159
+ return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name);
160
+ }
161
+ const test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
162
+ function isNamedNodeMap(collection) {
163
+ return collection.constructor.name === "NamedNodeMap";
164
+ }
165
+ const serialize$4 = (collection, config, indentation, depth, refs, printer) => {
166
+ const name = collection.constructor.name;
167
+ if (++depth > config.maxDepth) return `[${name}]`;
168
+ return (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(isNamedNodeMap(collection) ? [...collection].reduce((props, attribute) => {
169
+ props[attribute.name] = attribute.value;
170
+ return props;
171
+ }, {}) : { ...collection }, config, indentation, depth, refs, printer)}}` : `[${printListItems([...collection], config, indentation, depth, refs, printer)}]`);
172
+ };
173
+ const plugin$4 = {
174
+ serialize: serialize$4,
175
+ test: test$4
176
+ };
177
+ /**
178
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
179
+ *
180
+ * This source code is licensed under the MIT license found in the
181
+ * LICENSE file in the root directory of this source tree.
182
+ */
183
+ function escapeHTML(str) {
184
+ return str.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
185
+ }
186
+ function printProps(keys, props, config, indentation, depth, refs, printer) {
187
+ const indentationNext = indentation + config.indent;
188
+ const colors = config.colors;
189
+ return keys.map((key) => {
190
+ const value = props[key];
191
+ if (typeof value === "string" && value[0] === "_" && value.startsWith("__vitest_") && value.match(/__vitest_\d+__/)) return "";
192
+ let printed = printer(value, config, indentationNext, depth, refs);
193
+ if (typeof value !== "string") {
194
+ if (printed.includes("\n")) printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
195
+ printed = `{${printed}}`;
196
+ }
197
+ return `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`;
198
+ }).join("");
199
+ }
200
+ function printChildren(children, config, indentation, depth, refs, printer) {
201
+ return children.map((child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer(child, config, indentation, depth, refs))).join("");
202
+ }
203
+ function printShadowRoot(children, config, indentation, depth, refs, printer) {
204
+ if (config.printShadowRoot === false) return "";
205
+ return [`${config.spacingOuter + indentation}#shadow-root`, printChildren(children, config, indentation + config.indent, depth, refs, printer)].join("");
206
+ }
207
+ function printText(text, config) {
208
+ const contentColor = config.colors.content;
209
+ return contentColor.open + escapeHTML(text) + contentColor.close;
210
+ }
211
+ function printComment(comment, config) {
212
+ const commentColor = config.colors.comment;
213
+ return `${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`;
214
+ }
215
+ function printElement(type, printedProps, printedChildren, config, indentation) {
216
+ const tagColor = config.colors.tag;
217
+ return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}</${type}` : `${printedProps && !config.min ? "" : " "}/`}>${tagColor.close}`;
218
+ }
219
+ function printElementAsLeaf(type, config) {
220
+ const tagColor = config.colors.tag;
221
+ return `${tagColor.open}<${type}${tagColor.close} …${tagColor.open} />${tagColor.close}`;
222
+ }
223
+ const ELEMENT_NODE = 1;
224
+ const TEXT_NODE = 3;
225
+ const COMMENT_NODE = 8;
226
+ const FRAGMENT_NODE = 11;
227
+ const ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/;
228
+ function testHasAttribute(val) {
229
+ try {
230
+ return typeof val.hasAttribute === "function" && val.hasAttribute("is");
231
+ } catch {
232
+ return false;
233
+ }
234
+ }
235
+ function testNode(val) {
236
+ const constructorName = val.constructor.name;
237
+ const { nodeType, tagName } = val;
238
+ const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
239
+ return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
240
+ }
241
+ const test$3 = (val) => val?.constructor?.name && testNode(val);
242
+ function nodeIsText(node) {
243
+ return node.nodeType === TEXT_NODE;
244
+ }
245
+ function nodeIsComment(node) {
246
+ return node.nodeType === COMMENT_NODE;
247
+ }
248
+ function nodeIsFragment(node) {
249
+ return node.nodeType === FRAGMENT_NODE;
250
+ }
251
+ function filterChildren(children, filterNode) {
252
+ let filtered = children.filter((node) => {
253
+ if (node.nodeType === TEXT_NODE) return (node.data || "").trim().length > 0;
254
+ return true;
255
+ });
256
+ if (filterNode) filtered = filtered.filter(filterNode);
257
+ return filtered;
258
+ }
259
+ function serializeDOM(node, config, indentation, depth, refs, printer, filterNode) {
260
+ if (nodeIsText(node)) return printText(node.data, config);
261
+ if (nodeIsComment(node)) return printComment(node.data, config);
262
+ const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
263
+ if (++depth > config.maxDepth) return printElementAsLeaf(type, config);
264
+ const children = Array.prototype.slice.call(node.childNodes || node.children);
265
+ const shadowChildren = nodeIsFragment(node) || !node.shadowRoot ? [] : Array.prototype.slice.call(node.shadowRoot.children);
266
+ const resolvedChildren = filterNode ? filterChildren(children, filterNode) : children;
267
+ const resolvedShadowChildren = filterNode ? filterChildren(shadowChildren, filterNode) : shadowChildren;
268
+ return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(), nodeIsFragment(node) ? {} : [...node.attributes].reduce((props, attribute) => {
269
+ props[attribute.name] = attribute.value;
270
+ return props;
271
+ }, {}), config, indentation + config.indent, depth, refs, printer), (resolvedShadowChildren.length > 0 ? printShadowRoot(resolvedShadowChildren, config, indentation + config.indent, depth, refs, printer) : "") + printChildren(resolvedChildren, config, indentation + config.indent, depth, refs, printer), config, indentation);
272
+ }
273
+ const serialize$3 = (node, config, indentation, depth, refs, printer) => serializeDOM(node, config, indentation, depth, refs, printer);
274
+ function createDOMElementFilter(filterNode) {
275
+ return {
276
+ test: test$3,
277
+ serialize: (node, config, indentation, depth, refs, printer) => serializeDOM(node, config, indentation, depth, refs, printer, filterNode)
278
+ };
279
+ }
280
+ const plugin$3 = {
281
+ serialize: serialize$3,
282
+ test: test$3
283
+ };
284
+ const IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
285
+ const IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
286
+ const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
287
+ const IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
288
+ const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
289
+ const IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
290
+ const IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
291
+ const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
292
+ const IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
293
+ const getImmutableName = (name) => `Immutable.${name}`;
294
+ const printAsLeaf = (name) => `[${name}]`;
295
+ const SPACE = " ";
296
+ const LAZY = "…";
297
+ function printImmutableEntries(val, config, indentation, depth, refs, printer, type) {
298
+ return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${printIteratorEntries(val.entries(), config, indentation, depth, refs, printer)}}`;
299
+ }
300
+ function getRecordEntries(val) {
301
+ let i = 0;
302
+ return { next() {
303
+ if (i < val._keys.length) {
304
+ const key = val._keys[i++];
305
+ return {
306
+ done: false,
307
+ value: [key, val.get(key)]
308
+ };
309
+ }
310
+ return {
311
+ done: true,
312
+ value: void 0
313
+ };
314
+ } };
315
+ }
316
+ function printImmutableRecord(val, config, indentation, depth, refs, printer) {
317
+ const name = getImmutableName(val._name || "Record");
318
+ return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(getRecordEntries(val), config, indentation, depth, refs, printer)}}`;
319
+ }
320
+ function printImmutableSeq(val, config, indentation, depth, refs, printer) {
321
+ const name = getImmutableName("Seq");
322
+ if (++depth > config.maxDepth) return printAsLeaf(name);
323
+ if (val[IS_KEYED_SENTINEL]) return `${name + SPACE}{${val._iter || val._object ? printIteratorEntries(val.entries(), config, indentation, depth, refs, printer) : LAZY}}`;
324
+ return `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(val.values(), config, indentation, depth, refs, printer) : LAZY}]`;
325
+ }
326
+ function printImmutableValues(val, config, indentation, depth, refs, printer, type) {
327
+ return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${printIteratorValues(val.values(), config, indentation, depth, refs, printer)}]`;
328
+ }
329
+ const serialize$2 = (val, config, indentation, depth, refs, printer) => {
330
+ if (val[IS_MAP_SENTINEL]) return printImmutableEntries(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map");
331
+ if (val[IS_LIST_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, "List");
332
+ if (val[IS_SET_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set");
333
+ if (val[IS_STACK_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, "Stack");
334
+ if (val[IS_SEQ_SENTINEL]) return printImmutableSeq(val, config, indentation, depth, refs, printer);
335
+ return printImmutableRecord(val, config, indentation, depth, refs, printer);
336
+ };
337
+ const test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
338
+ const plugin$2 = {
339
+ serialize: serialize$2,
340
+ test: test$2
341
+ };
342
+ function getDefaultExportFromCjs(x) {
343
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
344
+ }
345
+ var reactIs$1 = { exports: {} };
346
+ var reactIs_production = {};
347
+ /**
348
+ * @license React
349
+ * react-is.production.js
350
+ *
351
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
352
+ *
353
+ * This source code is licensed under the MIT license found in the
354
+ * LICENSE file in the root directory of this source tree.
355
+ */
356
+ var hasRequiredReactIs_production;
357
+ function requireReactIs_production() {
358
+ if (hasRequiredReactIs_production) return reactIs_production;
359
+ hasRequiredReactIs_production = 1;
360
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
361
+ function typeOf(object) {
362
+ if ("object" === typeof object && null !== object) {
363
+ var $$typeof = object.$$typeof;
364
+ switch ($$typeof) {
365
+ case REACT_ELEMENT_TYPE: switch (object = object.type, object) {
366
+ case REACT_FRAGMENT_TYPE:
367
+ case REACT_PROFILER_TYPE:
368
+ case REACT_STRICT_MODE_TYPE:
369
+ case REACT_SUSPENSE_TYPE:
370
+ case REACT_SUSPENSE_LIST_TYPE:
371
+ case REACT_VIEW_TRANSITION_TYPE: return object;
372
+ default: switch (object = object && object.$$typeof, object) {
373
+ case REACT_CONTEXT_TYPE:
374
+ case REACT_FORWARD_REF_TYPE:
375
+ case REACT_LAZY_TYPE:
376
+ case REACT_MEMO_TYPE: return object;
377
+ case REACT_CONSUMER_TYPE: return object;
378
+ default: return $$typeof;
379
+ }
380
+ }
381
+ case REACT_PORTAL_TYPE: return $$typeof;
382
+ }
383
+ }
384
+ }
385
+ reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
386
+ reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
387
+ reactIs_production.Element = REACT_ELEMENT_TYPE;
388
+ reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
389
+ reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
390
+ reactIs_production.Lazy = REACT_LAZY_TYPE;
391
+ reactIs_production.Memo = REACT_MEMO_TYPE;
392
+ reactIs_production.Portal = REACT_PORTAL_TYPE;
393
+ reactIs_production.Profiler = REACT_PROFILER_TYPE;
394
+ reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
395
+ reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
396
+ reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
397
+ reactIs_production.isContextConsumer = function(object) {
398
+ return typeOf(object) === REACT_CONSUMER_TYPE;
399
+ };
400
+ reactIs_production.isContextProvider = function(object) {
401
+ return typeOf(object) === REACT_CONTEXT_TYPE;
402
+ };
403
+ reactIs_production.isElement = function(object) {
404
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
405
+ };
406
+ reactIs_production.isForwardRef = function(object) {
407
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
408
+ };
409
+ reactIs_production.isFragment = function(object) {
410
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
411
+ };
412
+ reactIs_production.isLazy = function(object) {
413
+ return typeOf(object) === REACT_LAZY_TYPE;
414
+ };
415
+ reactIs_production.isMemo = function(object) {
416
+ return typeOf(object) === REACT_MEMO_TYPE;
417
+ };
418
+ reactIs_production.isPortal = function(object) {
419
+ return typeOf(object) === REACT_PORTAL_TYPE;
420
+ };
421
+ reactIs_production.isProfiler = function(object) {
422
+ return typeOf(object) === REACT_PROFILER_TYPE;
423
+ };
424
+ reactIs_production.isStrictMode = function(object) {
425
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
426
+ };
427
+ reactIs_production.isSuspense = function(object) {
428
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
429
+ };
430
+ reactIs_production.isSuspenseList = function(object) {
431
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
432
+ };
433
+ reactIs_production.isValidElementType = function(type) {
434
+ return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
435
+ };
436
+ reactIs_production.typeOf = typeOf;
437
+ return reactIs_production;
438
+ }
439
+ var hasRequiredReactIs$1;
440
+ function requireReactIs$1() {
441
+ if (hasRequiredReactIs$1) return reactIs$1.exports;
442
+ hasRequiredReactIs$1 = 1;
443
+ reactIs$1.exports = requireReactIs_production();
444
+ return reactIs$1.exports;
445
+ }
446
+ var reactIsExports$1 = requireReactIs$1();
447
+ var ReactIs19 = /* @__PURE__ */ _mergeNamespaces({
448
+ __proto__: null,
449
+ default: /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports$1)
450
+ }, [reactIsExports$1]);
451
+ var reactIs = { exports: {} };
452
+ var reactIs_production_min = {};
453
+ /**
454
+ * @license React
455
+ * react-is.production.min.js
456
+ *
457
+ * Copyright (c) Facebook, Inc. and its affiliates.
458
+ *
459
+ * This source code is licensed under the MIT license found in the
460
+ * LICENSE file in the root directory of this source tree.
461
+ */
462
+ var hasRequiredReactIs_production_min;
463
+ function requireReactIs_production_min() {
464
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
465
+ hasRequiredReactIs_production_min = 1;
466
+ var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u = Symbol.for("react.module.reference");
467
+ function v(a) {
468
+ if ("object" === typeof a && null !== a) {
469
+ var r = a.$$typeof;
470
+ switch (r) {
471
+ case b: switch (a = a.type, a) {
472
+ case d:
473
+ case f:
474
+ case e:
475
+ case m:
476
+ case n: return a;
477
+ default: switch (a = a && a.$$typeof, a) {
478
+ case k:
479
+ case h:
480
+ case l:
481
+ case q:
482
+ case p:
483
+ case g: return a;
484
+ default: return r;
485
+ }
486
+ }
487
+ case c: return r;
488
+ }
489
+ }
490
+ }
491
+ reactIs_production_min.ContextConsumer = h;
492
+ reactIs_production_min.ContextProvider = g;
493
+ reactIs_production_min.Element = b;
494
+ reactIs_production_min.ForwardRef = l;
495
+ reactIs_production_min.Fragment = d;
496
+ reactIs_production_min.Lazy = q;
497
+ reactIs_production_min.Memo = p;
498
+ reactIs_production_min.Portal = c;
499
+ reactIs_production_min.Profiler = f;
500
+ reactIs_production_min.StrictMode = e;
501
+ reactIs_production_min.Suspense = m;
502
+ reactIs_production_min.SuspenseList = n;
503
+ reactIs_production_min.isAsyncMode = function() {
504
+ return false;
505
+ };
506
+ reactIs_production_min.isConcurrentMode = function() {
507
+ return false;
508
+ };
509
+ reactIs_production_min.isContextConsumer = function(a) {
510
+ return v(a) === h;
511
+ };
512
+ reactIs_production_min.isContextProvider = function(a) {
513
+ return v(a) === g;
514
+ };
515
+ reactIs_production_min.isElement = function(a) {
516
+ return "object" === typeof a && null !== a && a.$$typeof === b;
517
+ };
518
+ reactIs_production_min.isForwardRef = function(a) {
519
+ return v(a) === l;
520
+ };
521
+ reactIs_production_min.isFragment = function(a) {
522
+ return v(a) === d;
523
+ };
524
+ reactIs_production_min.isLazy = function(a) {
525
+ return v(a) === q;
526
+ };
527
+ reactIs_production_min.isMemo = function(a) {
528
+ return v(a) === p;
529
+ };
530
+ reactIs_production_min.isPortal = function(a) {
531
+ return v(a) === c;
532
+ };
533
+ reactIs_production_min.isProfiler = function(a) {
534
+ return v(a) === f;
535
+ };
536
+ reactIs_production_min.isStrictMode = function(a) {
537
+ return v(a) === e;
538
+ };
539
+ reactIs_production_min.isSuspense = function(a) {
540
+ return v(a) === m;
541
+ };
542
+ reactIs_production_min.isSuspenseList = function(a) {
543
+ return v(a) === n;
544
+ };
545
+ reactIs_production_min.isValidElementType = function(a) {
546
+ return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
547
+ };
548
+ reactIs_production_min.typeOf = v;
549
+ return reactIs_production_min;
550
+ }
551
+ var hasRequiredReactIs;
552
+ function requireReactIs() {
553
+ if (hasRequiredReactIs) return reactIs.exports;
554
+ hasRequiredReactIs = 1;
555
+ reactIs.exports = requireReactIs_production_min();
556
+ return reactIs.exports;
557
+ }
558
+ var reactIsExports = requireReactIs();
559
+ var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
560
+ __proto__: null,
561
+ default: /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports)
562
+ }, [reactIsExports]);
563
+ const ReactIs = Object.fromEntries([
564
+ "isAsyncMode",
565
+ "isConcurrentMode",
566
+ "isContextConsumer",
567
+ "isContextProvider",
568
+ "isElement",
569
+ "isForwardRef",
570
+ "isFragment",
571
+ "isLazy",
572
+ "isMemo",
573
+ "isPortal",
574
+ "isProfiler",
575
+ "isStrictMode",
576
+ "isSuspense",
577
+ "isSuspenseList",
578
+ "isValidElementType"
579
+ ].map((m) => [m, (v) => ReactIs18[m](v) || ReactIs19[m](v)]));
580
+ function getChildren(arg, children = []) {
581
+ if (Array.isArray(arg)) for (const item of arg) getChildren(item, children);
582
+ else if (arg != null && arg !== false && arg !== "") children.push(arg);
583
+ return children;
584
+ }
585
+ function getType(element) {
586
+ const type = element.type;
587
+ if (typeof type === "string") return type;
588
+ if (typeof type === "function") return type.displayName || type.name || "Unknown";
589
+ if (ReactIs.isFragment(element)) return "React.Fragment";
590
+ if (ReactIs.isSuspense(element)) return "React.Suspense";
591
+ if (typeof type === "object" && type !== null) {
592
+ if (ReactIs.isContextProvider(element)) return "Context.Provider";
593
+ if (ReactIs.isContextConsumer(element)) return "Context.Consumer";
594
+ if (ReactIs.isForwardRef(element)) {
595
+ if (type.displayName) return type.displayName;
596
+ const functionName = type.render.displayName || type.render.name || "";
597
+ return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
598
+ }
599
+ if (ReactIs.isMemo(element)) {
600
+ const functionName = type.displayName || type.type.displayName || type.type.name || "";
601
+ return functionName === "" ? "Memo" : `Memo(${functionName})`;
602
+ }
603
+ }
604
+ return "UNDEFINED";
605
+ }
606
+ function getPropKeys$1(element) {
607
+ const { props } = element;
608
+ return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
609
+ }
610
+ const serialize$1 = (element, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(getType(element), printProps(getPropKeys$1(element), element.props, config, indentation + config.indent, depth, refs, printer), printChildren(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer), config, indentation);
611
+ const test$1 = (val) => val != null && ReactIs.isElement(val);
612
+ const plugin$1 = {
613
+ serialize: serialize$1,
614
+ test: test$1
615
+ };
616
+ const testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
617
+ function getPropKeys(object) {
618
+ const { props } = object;
619
+ return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
620
+ }
621
+ const serialize = (object, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(object.type, object.props ? printProps(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer) : "", object.children ? printChildren(object.children, config, indentation + config.indent, depth, refs, printer) : "", config, indentation);
622
+ const test = (val) => val && val.$$typeof === testSymbol;
623
+ const plugin = {
624
+ serialize,
625
+ test
626
+ };
627
+ const toString = Object.prototype.toString;
628
+ const toISOString = Date.prototype.toISOString;
629
+ const errorToString = Error.prototype.toString;
630
+ const regExpToString = RegExp.prototype.toString;
631
+ /**
632
+ * Explicitly comparing typeof constructor to function avoids undefined as name
633
+ * when mock identity-obj-proxy returns the key as the value for any key.
634
+ */
635
+ function getConstructorName(val) {
636
+ return typeof val.constructor === "function" && val.constructor.name || "Object";
637
+ }
638
+ /** Is val is equal to global window object? Works even if it does not exist :) */
639
+ function isWindow(val) {
640
+ return typeof window !== "undefined" && val === window;
641
+ }
642
+ const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
643
+ const NEWLINE_REGEXP = /\n/g;
644
+ var PrettyFormatPluginError = class extends Error {
645
+ constructor(message, stack) {
646
+ super(message);
647
+ this.stack = stack;
648
+ this.name = this.constructor.name;
649
+ }
650
+ };
651
+ function isToStringedArrayType(toStringed) {
652
+ return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
653
+ }
654
+ function printNumber(val) {
655
+ return Object.is(val, -0) ? "-0" : String(val);
656
+ }
657
+ function printBigInt(val) {
658
+ return String(`${val}n`);
659
+ }
660
+ function printFunction(val, printFunctionName) {
661
+ if (!printFunctionName) return "[Function]";
662
+ return `[Function ${val.name || "anonymous"}]`;
663
+ }
664
+ function printSymbol(val) {
665
+ return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
666
+ }
667
+ function printError(val) {
668
+ return `[${errorToString.call(val)}]`;
669
+ }
670
+ /**
671
+ * The first port of call for printing an object, handles most of the
672
+ * data-types in JS.
673
+ */
674
+ function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
675
+ if (val === true || val === false) return `${val}`;
676
+ if (val === void 0) return "undefined";
677
+ if (val === null) return "null";
678
+ const typeOf = typeof val;
679
+ if (typeOf === "number") return printNumber(val);
680
+ if (typeOf === "bigint") return printBigInt(val);
681
+ if (typeOf === "string") {
682
+ if (escapeString) return `"${val.replaceAll(/"|\\/g, "\\$&")}"`;
683
+ return `"${val}"`;
684
+ }
685
+ if (typeOf === "function") return printFunction(val, printFunctionName);
686
+ if (typeOf === "symbol") return printSymbol(val);
687
+ const toStringed = toString.call(val);
688
+ if (toStringed === "[object WeakMap]") return "WeakMap {}";
689
+ if (toStringed === "[object WeakSet]") return "WeakSet {}";
690
+ if (toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]") return printFunction(val, printFunctionName);
691
+ if (toStringed === "[object Symbol]") return printSymbol(val);
692
+ if (toStringed === "[object Date]") return Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val);
693
+ if (toStringed === "[object Error]") return printError(val);
694
+ if (toStringed === "[object RegExp]") {
695
+ if (escapeRegex) return regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&");
696
+ return regExpToString.call(val);
697
+ }
698
+ if (val instanceof Error) return printError(val);
699
+ return null;
700
+ }
701
+ /**
702
+ * Handles more complex objects ( such as objects with circular references.
703
+ * maps and sets etc )
704
+ */
705
+ function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) {
706
+ if (refs.includes(val)) return "[Circular]";
707
+ refs = [...refs];
708
+ refs.push(val);
709
+ const hitMaxDepth = ++depth > config.maxDepth;
710
+ const min = config.min;
711
+ if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON === "function" && !hasCalledToJSON) return printer(val.toJSON(), config, indentation, depth, refs, true);
712
+ const toStringed = toString.call(val);
713
+ if (toStringed === "[object Arguments]") return hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${printListItems(val, config, indentation, depth, refs, printer)}]`;
714
+ if (isToStringedArrayType(toStringed)) return hitMaxDepth ? `[${val.constructor.name}]` : `${min ? "" : !config.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${printListItems(val, config, indentation, depth, refs, printer)}]`;
715
+ if (toStringed === "[object Map]") return hitMaxDepth ? "[Map]" : `Map {${printIteratorEntries(val.entries(), config, indentation, depth, refs, printer, " => ")}}`;
716
+ if (toStringed === "[object Set]") return hitMaxDepth ? "[Set]" : `Set {${printIteratorValues(val.values(), config, indentation, depth, refs, printer)}}`;
717
+ return hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min ? "" : !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${printObjectProperties(val, config, indentation, depth, refs, printer)}}`;
718
+ }
719
+ const ErrorPlugin = {
720
+ test: (val) => val && val instanceof Error,
721
+ serialize(val, config, indentation, depth, refs, printer) {
722
+ if (refs.includes(val)) return "[Circular]";
723
+ refs = [...refs, val];
724
+ const hitMaxDepth = ++depth > config.maxDepth;
725
+ const { message, cause, ...rest } = val;
726
+ const entries = {
727
+ message,
728
+ ...typeof cause !== "undefined" ? { cause } : {},
729
+ ...val instanceof AggregateError ? { errors: val.errors } : {},
730
+ ...rest
731
+ };
732
+ const name = val.name !== "Error" ? val.name : getConstructorName(val);
733
+ return hitMaxDepth ? `[${name}]` : `${name} {${printIteratorEntries(Object.entries(entries).values(), config, indentation, depth, refs, printer)}}`;
734
+ }
735
+ };
736
+ function isNewPlugin(plugin) {
737
+ return plugin.serialize != null;
738
+ }
739
+ function printPlugin(plugin, val, config, indentation, depth, refs) {
740
+ let printed;
741
+ try {
742
+ printed = isNewPlugin(plugin) ? plugin.serialize(val, config, indentation, depth, refs, printer) : plugin.print(val, (valChild) => printer(valChild, config, indentation, depth, refs), (str) => {
743
+ const indentationNext = indentation + config.indent;
744
+ return indentationNext + str.replaceAll(NEWLINE_REGEXP, `\n${indentationNext}`);
745
+ }, {
746
+ edgeSpacing: config.spacingOuter,
747
+ min: config.min,
748
+ spacing: config.spacingInner
749
+ }, config.colors);
750
+ } catch (error) {
751
+ throw new PrettyFormatPluginError(error.message, error.stack);
752
+ }
753
+ if (typeof printed !== "string") throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`);
754
+ return printed;
755
+ }
756
+ function findPlugin(plugins, val) {
757
+ for (const plugin of plugins) try {
758
+ if (plugin.test(val)) return plugin;
759
+ } catch (error) {
760
+ throw new PrettyFormatPluginError(error.message, error.stack);
761
+ }
762
+ return null;
763
+ }
764
+ function printer(val, config, indentation, depth, refs, hasCalledToJSON) {
765
+ const plugin = findPlugin(config.plugins, val);
766
+ if (plugin !== null) return printPlugin(plugin, val, config, indentation, depth, refs);
767
+ const basicResult = printBasicValue(val, config.printFunctionName, config.escapeRegex, config.escapeString);
768
+ if (basicResult !== null) return basicResult;
769
+ return printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON);
770
+ }
771
+ const DEFAULT_THEME = {
772
+ comment: "gray",
773
+ content: "reset",
774
+ prop: "yellow",
775
+ tag: "cyan",
776
+ value: "green"
777
+ };
778
+ const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);
779
+ const DEFAULT_OPTIONS = {
780
+ callToJSON: true,
781
+ compareKeys: void 0,
782
+ escapeRegex: false,
783
+ escapeString: true,
784
+ highlight: false,
785
+ indent: 2,
786
+ maxDepth: Number.POSITIVE_INFINITY,
787
+ maxWidth: Number.POSITIVE_INFINITY,
788
+ min: false,
789
+ plugins: [],
790
+ printBasicPrototype: true,
791
+ printFunctionName: true,
792
+ printShadowRoot: true,
793
+ theme: DEFAULT_THEME
794
+ };
795
+ function validateOptions(options) {
796
+ for (const key of Object.keys(options)) if (!Object.hasOwn(DEFAULT_OPTIONS, key)) throw new Error(`pretty-format: Unknown option "${key}".`);
797
+ if (options.min && options.indent !== void 0 && options.indent !== 0) throw new Error("pretty-format: Options \"min\" and \"indent\" cannot be used together.");
798
+ }
799
+ function getColorsHighlight() {
800
+ return DEFAULT_THEME_KEYS.reduce((colors, key) => {
801
+ const value = DEFAULT_THEME[key];
802
+ const color = value && y[value];
803
+ if (color && typeof color.close === "string" && typeof color.open === "string") colors[key] = color;
804
+ else throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`);
805
+ return colors;
806
+ }, Object.create(null));
807
+ }
808
+ function getColorsEmpty() {
809
+ return DEFAULT_THEME_KEYS.reduce((colors, key) => {
810
+ colors[key] = {
811
+ close: "",
812
+ open: ""
813
+ };
814
+ return colors;
815
+ }, Object.create(null));
816
+ }
817
+ function getPrintFunctionName(options) {
818
+ return options?.printFunctionName ?? DEFAULT_OPTIONS.printFunctionName;
819
+ }
820
+ function getEscapeRegex(options) {
821
+ return options?.escapeRegex ?? DEFAULT_OPTIONS.escapeRegex;
822
+ }
823
+ function getEscapeString(options) {
824
+ return options?.escapeString ?? DEFAULT_OPTIONS.escapeString;
825
+ }
826
+ function getConfig(options) {
827
+ return {
828
+ callToJSON: options?.callToJSON ?? DEFAULT_OPTIONS.callToJSON,
829
+ colors: options?.highlight ? getColorsHighlight() : getColorsEmpty(),
830
+ compareKeys: typeof options?.compareKeys === "function" || options?.compareKeys === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
831
+ escapeRegex: getEscapeRegex(options),
832
+ escapeString: getEscapeString(options),
833
+ indent: options?.min ? "" : createIndent(options?.indent ?? DEFAULT_OPTIONS.indent),
834
+ maxDepth: options?.maxDepth ?? DEFAULT_OPTIONS.maxDepth,
835
+ maxWidth: options?.maxWidth ?? DEFAULT_OPTIONS.maxWidth,
836
+ min: options?.min ?? DEFAULT_OPTIONS.min,
837
+ plugins: options?.plugins ?? DEFAULT_OPTIONS.plugins,
838
+ printBasicPrototype: options?.printBasicPrototype ?? true,
839
+ printFunctionName: getPrintFunctionName(options),
840
+ printShadowRoot: options?.printShadowRoot ?? true,
841
+ spacingInner: options?.min ? " " : "\n",
842
+ spacingOuter: options?.min ? "" : "\n"
843
+ };
844
+ }
845
+ function createIndent(indent) {
846
+ return Array.from({ length: indent + 1 }).join(" ");
847
+ }
848
+ /**
849
+ * Returns a presentation string of your `val` object
850
+ * @param val any potential JavaScript object
851
+ * @param options Custom settings
852
+ */
853
+ function format(val, options) {
854
+ if (options) {
855
+ validateOptions(options);
856
+ if (options.plugins) {
857
+ const plugin = findPlugin(options.plugins, val);
858
+ if (plugin !== null) return printPlugin(plugin, val, getConfig(options), "", 0, []);
859
+ }
860
+ }
861
+ const basicResult = printBasicValue(val, getPrintFunctionName(options), getEscapeRegex(options), getEscapeString(options));
862
+ if (basicResult !== null) return basicResult;
863
+ return printComplexValue(val, getConfig(options), "", 0, []);
864
+ }
865
+ const plugins = {
866
+ AsymmetricMatcher: plugin$5,
867
+ DOMCollection: plugin$4,
868
+ DOMElement: plugin$3,
869
+ Immutable: plugin$2,
870
+ ReactElement: plugin$1,
871
+ ReactTestComponent: plugin,
872
+ Error: ErrorPlugin
873
+ };
874
+ //#endregion
875
+ export { createDOMElementFilter, format, plugins };
876
+
877
+ //# sourceMappingURL=index.js.map