@orchard9ai/testing-utils
Version:
Testing utilities for Orchard9 platform
1,349 lines (1,329 loc) • 439 kB
JavaScript
'use strict';
var React = require('react');
var react_star = require('@testing-library/react');
var faker = require('@faker-js/faker');
var jestAxe = require('jest-axe');
var axe = require('axe-core');
var userEvent = require('@testing-library/user-event');
require('@testing-library/jest-dom');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var React__default = /*#__PURE__*/_interopDefault(React);
var react_star__namespace = /*#__PURE__*/_interopNamespace(react_star);
var axe__default = /*#__PURE__*/_interopDefault(axe);
var userEvent__default = /*#__PURE__*/_interopDefault(userEvent);
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// ../../node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.js
var require_ansi_styles = __commonJS({
"../../node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.js"(exports, module2) {
var ANSI_BACKGROUND_OFFSET = 10;
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
function assembleStyles() {
const codes = /* @__PURE__ */ new Map();
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
styles.color.gray = styles.color.blackBright;
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
styles.color.grey = styles.color.blackBright;
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
for (const [groupName, group] of Object.entries(styles)) {
for (const [styleName, style] of Object.entries(group)) {
styles[styleName] = {
open: `\x1B[${style[0]}m`,
close: `\x1B[${style[1]}m`
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
}
Object.defineProperty(styles, "codes", {
value: codes,
enumerable: false
});
styles.color.close = "\x1B[39m";
styles.bgColor.close = "\x1B[49m";
styles.color.ansi256 = wrapAnsi256();
styles.color.ansi16m = wrapAnsi16m();
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
Object.defineProperties(styles, {
rgbToAnsi256: {
value: (red, green, blue) => {
if (red === green && green === blue) {
if (red < 8) {
return 16;
}
if (red > 248) {
return 231;
}
return Math.round((red - 8) / 247 * 24) + 232;
}
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
},
enumerable: false
},
hexToRgb: {
value: (hex) => {
const matches2 = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
if (!matches2) {
return [0, 0, 0];
}
let { colorString } = matches2.groups;
if (colorString.length === 3) {
colorString = colorString.split("").map((character) => character + character).join("");
}
const integer = Number.parseInt(colorString, 16);
return [
integer >> 16 & 255,
integer >> 8 & 255,
integer & 255
];
},
enumerable: false
},
hexToAnsi256: {
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
enumerable: false
}
});
return styles;
}
Object.defineProperty(module2, "exports", {
enumerable: true,
get: assembleStyles
});
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/collections.js
var require_collections = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/collections.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.printIteratorEntries = printIteratorEntries;
exports.printIteratorValues = printIteratorValues;
exports.printListItems = printListItems;
exports.printObjectProperties = printObjectProperties;
var getKeysOfEnumerableProperties = (object, compareKeys) => {
const keys = Object.keys(object).sort(compareKeys);
if (Object.getOwnPropertySymbols) {
Object.getOwnPropertySymbols(object).forEach((symbol) => {
if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {
keys.push(symbol);
}
});
}
return keys;
};
function printIteratorEntries(iterator, config2, indentation, depth, refs, printer, separator = ": ") {
let result = "";
let current = iterator.next();
if (!current.done) {
result += config2.spacingOuter;
const indentationNext = indentation + config2.indent;
while (!current.done) {
const name = printer(
current.value[0],
config2,
indentationNext,
depth,
refs
);
const value = printer(
current.value[1],
config2,
indentationNext,
depth,
refs
);
result += indentationNext + name + separator + value;
current = iterator.next();
if (!current.done) {
result += "," + config2.spacingInner;
} else if (!config2.min) {
result += ",";
}
}
result += config2.spacingOuter + indentation;
}
return result;
}
function printIteratorValues(iterator, config2, indentation, depth, refs, printer) {
let result = "";
let current = iterator.next();
if (!current.done) {
result += config2.spacingOuter;
const indentationNext = indentation + config2.indent;
while (!current.done) {
result += indentationNext + printer(current.value, config2, indentationNext, depth, refs);
current = iterator.next();
if (!current.done) {
result += "," + config2.spacingInner;
} else if (!config2.min) {
result += ",";
}
}
result += config2.spacingOuter + indentation;
}
return result;
}
function printListItems(list, config2, indentation, depth, refs, printer) {
let result = "";
if (list.length) {
result += config2.spacingOuter;
const indentationNext = indentation + config2.indent;
for (let i = 0; i < list.length; i++) {
result += indentationNext;
if (i in list) {
result += printer(list[i], config2, indentationNext, depth, refs);
}
if (i < list.length - 1) {
result += "," + config2.spacingInner;
} else if (!config2.min) {
result += ",";
}
}
result += config2.spacingOuter + indentation;
}
return result;
}
function printObjectProperties(val, config2, indentation, depth, refs, printer) {
let result = "";
const keys = getKeysOfEnumerableProperties(val, config2.compareKeys);
if (keys.length) {
result += config2.spacingOuter;
const indentationNext = indentation + config2.indent;
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const name = printer(key, config2, indentationNext, depth, refs);
const value = printer(val[key], config2, indentationNext, depth, refs);
result += indentationNext + name + ": " + value;
if (i < keys.length - 1) {
result += "," + config2.spacingInner;
} else if (!config2.min) {
result += ",";
}
}
result += config2.spacingOuter + indentation;
}
return result;
}
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
var require_AsymmetricMatcher = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
var global2 = function() {
if (typeof globalThis !== "undefined") {
return globalThis;
} else if (typeof global2 !== "undefined") {
return global2;
} else if (typeof self !== "undefined") {
return self;
} else if (typeof window !== "undefined") {
return window;
} else {
return Function("return this")();
}
}();
var Symbol2 = global2["jest-symbol-do-not-touch"] || global2.Symbol;
var asymmetricMatcher = typeof Symbol2 === "function" && Symbol2.for ? Symbol2.for("jest.asymmetricMatcher") : 1267621;
var SPACE = " ";
var serialize = (val, config2, indentation, depth, refs, printer) => {
const stringedValue = val.toString();
if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
if (++depth > config2.maxDepth) {
return "[" + stringedValue + "]";
}
return stringedValue + SPACE + "[" + (0, _collections.printListItems)(
val.sample,
config2,
indentation,
depth,
refs,
printer
) + "]";
}
if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
if (++depth > config2.maxDepth) {
return "[" + stringedValue + "]";
}
return stringedValue + SPACE + "{" + (0, _collections.printObjectProperties)(
val.sample,
config2,
indentation,
depth,
refs,
printer
) + "}";
}
if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") {
return stringedValue + SPACE + printer(val.sample, config2, indentation, depth, refs);
}
if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") {
return stringedValue + SPACE + printer(val.sample, config2, indentation, depth, refs);
}
return val.toAsymmetricMatcher();
};
exports.serialize = serialize;
var test = (val) => val && val.$$typeof === asymmetricMatcher;
exports.test = test;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
var require_ansi_regex = __commonJS({
"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module2) {
module2.exports = ({ onlyFirst = false } = {}) => {
const pattern = [
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
].join("|");
return new RegExp(pattern, onlyFirst ? void 0 : "g");
};
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ConvertAnsi.js
var require_ConvertAnsi = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _ansiRegex = _interopRequireDefault(require_ansi_regex());
var _ansiStyles = _interopRequireDefault(require_ansi_styles());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var toHumanReadableAnsi = (text) => text.replace((0, _ansiRegex.default)(), (match) => {
switch (match) {
case _ansiStyles.default.red.close:
case _ansiStyles.default.green.close:
case _ansiStyles.default.cyan.close:
case _ansiStyles.default.gray.close:
case _ansiStyles.default.white.close:
case _ansiStyles.default.yellow.close:
case _ansiStyles.default.bgRed.close:
case _ansiStyles.default.bgGreen.close:
case _ansiStyles.default.bgYellow.close:
case _ansiStyles.default.inverse.close:
case _ansiStyles.default.dim.close:
case _ansiStyles.default.bold.close:
case _ansiStyles.default.reset.open:
case _ansiStyles.default.reset.close:
return "</>";
case _ansiStyles.default.red.open:
return "<red>";
case _ansiStyles.default.green.open:
return "<green>";
case _ansiStyles.default.cyan.open:
return "<cyan>";
case _ansiStyles.default.gray.open:
return "<gray>";
case _ansiStyles.default.white.open:
return "<white>";
case _ansiStyles.default.yellow.open:
return "<yellow>";
case _ansiStyles.default.bgRed.open:
return "<bgRed>";
case _ansiStyles.default.bgGreen.open:
return "<bgGreen>";
case _ansiStyles.default.bgYellow.open:
return "<bgYellow>";
case _ansiStyles.default.inverse.open:
return "<inverse>";
case _ansiStyles.default.dim.open:
return "<dim>";
case _ansiStyles.default.bold.open:
return "<bold>";
default:
return "";
}
});
var test = (val) => typeof val === "string" && !!val.match((0, _ansiRegex.default)());
exports.test = test;
var serialize = (val, config2, indentation, depth, refs, printer) => printer(toHumanReadableAnsi(val), config2, indentation, depth, refs);
exports.serialize = serialize;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMCollection.js
var require_DOMCollection = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMCollection.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
var SPACE = " ";
var OBJECT_NAMES = ["DOMStringMap", "NamedNodeMap"];
var ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/;
var testName = (name) => OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);
var test = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
exports.test = test;
var isNamedNodeMap = (collection) => collection.constructor.name === "NamedNodeMap";
var serialize = (collection, config2, indentation, depth, refs, printer) => {
const name = collection.constructor.name;
if (++depth > config2.maxDepth) {
return "[" + name + "]";
}
return (config2.min ? "" : name + SPACE) + (OBJECT_NAMES.indexOf(name) !== -1 ? "{" + (0, _collections.printObjectProperties)(
isNamedNodeMap(collection) ? Array.from(collection).reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}) : { ...collection },
config2,
indentation,
depth,
refs,
printer
) + "}" : "[" + (0, _collections.printListItems)(
Array.from(collection),
config2,
indentation,
depth,
refs,
printer
) + "]");
};
exports.serialize = serialize;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/escapeHTML.js
var require_escapeHTML = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = escapeHTML2;
function escapeHTML2(str) {
return str.replace(/</g, "<").replace(/>/g, ">");
}
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/markup.js
var require_markup = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/markup.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.printText = exports.printProps = exports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printChildren = void 0;
var _escapeHTML = _interopRequireDefault(require_escapeHTML());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var printProps2 = (keys, props, config2, indentation, depth, refs, printer) => {
const indentationNext = indentation + config2.indent;
const colors = config2.colors;
return keys.map((key) => {
const value = props[key];
let printed = printer(value, config2, indentationNext, depth, refs);
if (typeof value !== "string") {
if (printed.indexOf("\n") !== -1) {
printed = config2.spacingOuter + indentationNext + printed + config2.spacingOuter + indentation;
}
printed = "{" + printed + "}";
}
return config2.spacingInner + indentation + colors.prop.open + key + colors.prop.close + "=" + colors.value.open + printed + colors.value.close;
}).join("");
};
exports.printProps = printProps2;
var printChildren2 = (children, config2, indentation, depth, refs, printer) => children.map(
(child) => config2.spacingOuter + indentation + (typeof child === "string" ? printText2(child, config2) : printer(child, config2, indentation, depth, refs))
).join("");
exports.printChildren = printChildren2;
var printText2 = (text, config2) => {
const contentColor = config2.colors.content;
return contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close;
};
exports.printText = printText2;
var printComment2 = (comment, config2) => {
const commentColor = config2.colors.comment;
return commentColor.open + "<!--" + (0, _escapeHTML.default)(comment) + "-->" + commentColor.close;
};
exports.printComment = printComment2;
var printElement2 = (type, printedProps, printedChildren, config2, indentation) => {
const tagColor = config2.colors.tag;
return tagColor.open + "<" + type + (printedProps && tagColor.close + printedProps + config2.spacingOuter + indentation + tagColor.open) + (printedChildren ? ">" + tagColor.close + printedChildren + config2.spacingOuter + indentation + tagColor.open + "</" + type : (printedProps && !config2.min ? "" : " ") + "/") + ">" + tagColor.close;
};
exports.printElement = printElement2;
var printElementAsLeaf2 = (type, config2) => {
const tagColor = config2.colors.tag;
return tagColor.open + "<" + type + tagColor.close + " \u2026" + tagColor.open + " />" + tagColor.close;
};
exports.printElementAsLeaf = printElementAsLeaf2;
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMElement.js
var require_DOMElement = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMElement.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _markup = require_markup();
var ELEMENT_NODE2 = 1;
var TEXT_NODE2 = 3;
var COMMENT_NODE2 = 8;
var FRAGMENT_NODE2 = 11;
var ELEMENT_REGEXP2 = /^((HTML|SVG)\w*)?Element$/;
var testHasAttribute = (val) => {
try {
return typeof val.hasAttribute === "function" && val.hasAttribute("is");
} catch {
return false;
}
};
var testNode2 = (val) => {
const constructorName = val.constructor.name;
const { nodeType, tagName } = val;
const isCustomElement2 = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
return nodeType === ELEMENT_NODE2 && (ELEMENT_REGEXP2.test(constructorName) || isCustomElement2) || nodeType === TEXT_NODE2 && constructorName === "Text" || nodeType === COMMENT_NODE2 && constructorName === "Comment" || nodeType === FRAGMENT_NODE2 && constructorName === "DocumentFragment";
};
var test = (val) => {
var _val$constructor;
return (val === null || val === void 0 ? void 0 : (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode2(val);
};
exports.test = test;
function nodeIsText2(node) {
return node.nodeType === TEXT_NODE2;
}
function nodeIsComment2(node) {
return node.nodeType === COMMENT_NODE2;
}
function nodeIsFragment2(node) {
return node.nodeType === FRAGMENT_NODE2;
}
var serialize = (node, config2, indentation, depth, refs, printer) => {
if (nodeIsText2(node)) {
return (0, _markup.printText)(node.data, config2);
}
if (nodeIsComment2(node)) {
return (0, _markup.printComment)(node.data, config2);
}
const type = nodeIsFragment2(node) ? "DocumentFragment" : node.tagName.toLowerCase();
if (++depth > config2.maxDepth) {
return (0, _markup.printElementAsLeaf)(type, config2);
}
return (0, _markup.printElement)(
type,
(0, _markup.printProps)(
nodeIsFragment2(node) ? [] : Array.from(node.attributes).map((attr) => attr.name).sort(),
nodeIsFragment2(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}),
config2,
indentation + config2.indent,
depth,
refs,
printer
),
(0, _markup.printChildren)(
Array.prototype.slice.call(node.childNodes || node.children),
config2,
indentation + config2.indent,
depth,
refs,
printer
),
config2,
indentation
);
};
exports.serialize = serialize;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/Immutable.js
var require_Immutable = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/Immutable.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
var IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
var IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
var IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
var IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
var IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
var IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
var IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
var IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
var IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
var getImmutableName = (name) => "Immutable." + name;
var printAsLeaf = (name) => "[" + name + "]";
var SPACE = " ";
var LAZY = "\u2026";
var printImmutableEntries = (val, config2, indentation, depth, refs, printer, type) => ++depth > config2.maxDepth ? printAsLeaf(getImmutableName(type)) : getImmutableName(type) + SPACE + "{" + (0, _collections.printIteratorEntries)(
val.entries(),
config2,
indentation,
depth,
refs,
printer
) + "}";
function getRecordEntries(val) {
let i = 0;
return {
next() {
if (i < val._keys.length) {
const key = val._keys[i++];
return {
done: false,
value: [key, val.get(key)]
};
}
return {
done: true,
value: void 0
};
}
};
}
var printImmutableRecord = (val, config2, indentation, depth, refs, printer) => {
const name = getImmutableName(val._name || "Record");
return ++depth > config2.maxDepth ? printAsLeaf(name) : name + SPACE + "{" + (0, _collections.printIteratorEntries)(
getRecordEntries(val),
config2,
indentation,
depth,
refs,
printer
) + "}";
};
var printImmutableSeq = (val, config2, indentation, depth, refs, printer) => {
const name = getImmutableName("Seq");
if (++depth > config2.maxDepth) {
return printAsLeaf(name);
}
if (val[IS_KEYED_SENTINEL]) {
return name + SPACE + "{" + // from Immutable collection of entries or from ECMAScript object
(val._iter || val._object ? (0, _collections.printIteratorEntries)(
val.entries(),
config2,
indentation,
depth,
refs,
printer
) : LAZY) + "}";
}
return name + SPACE + "[" + (val._iter || // from Immutable collection of values
val._array || // from ECMAScript array
val._collection || // from ECMAScript collection in immutable v4
val._iterable ? (0, _collections.printIteratorValues)(
val.values(),
config2,
indentation,
depth,
refs,
printer
) : LAZY) + "]";
};
var printImmutableValues = (val, config2, indentation, depth, refs, printer, type) => ++depth > config2.maxDepth ? printAsLeaf(getImmutableName(type)) : getImmutableName(type) + SPACE + "[" + (0, _collections.printIteratorValues)(
val.values(),
config2,
indentation,
depth,
refs,
printer
) + "]";
var serialize = (val, config2, indentation, depth, refs, printer) => {
if (val[IS_MAP_SENTINEL]) {
return printImmutableEntries(
val,
config2,
indentation,
depth,
refs,
printer,
val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map"
);
}
if (val[IS_LIST_SENTINEL]) {
return printImmutableValues(
val,
config2,
indentation,
depth,
refs,
printer,
"List"
);
}
if (val[IS_SET_SENTINEL]) {
return printImmutableValues(
val,
config2,
indentation,
depth,
refs,
printer,
val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set"
);
}
if (val[IS_STACK_SENTINEL]) {
return printImmutableValues(
val,
config2,
indentation,
depth,
refs,
printer,
"Stack"
);
}
if (val[IS_SEQ_SENTINEL]) {
return printImmutableSeq(val, config2, indentation, depth, refs, printer);
}
return printImmutableRecord(val, config2, indentation, depth, refs, printer);
};
exports.serialize = serialize;
var test = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
exports.test = test;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.production.min.js
var require_react_is_production_min = __commonJS({
"../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
var b = 60103;
var c = 60106;
var d = 60107;
var e = 60108;
var f = 60114;
var g = 60109;
var h = 60110;
var k = 60112;
var l = 60113;
var m = 60120;
var n = 60115;
var p = 60116;
var q = 60121;
var r = 60122;
var u = 60117;
var v = 60129;
var w = 60131;
if ("function" === typeof Symbol && Symbol.for) {
x = Symbol.for;
b = x("react.element");
c = x("react.portal");
d = x("react.fragment");
e = x("react.strict_mode");
f = x("react.profiler");
g = x("react.provider");
h = x("react.context");
k = x("react.forward_ref");
l = x("react.suspense");
m = x("react.suspense_list");
n = x("react.memo");
p = x("react.lazy");
q = x("react.block");
r = x("react.server.block");
u = x("react.fundamental");
v = x("react.debug_trace_mode");
w = x("react.legacy_hidden");
}
var x;
function y(a) {
if ("object" === typeof a && null !== a) {
var t = a.$$typeof;
switch (t) {
case b:
switch (a = a.type, a) {
case d:
case f:
case e:
case l:
case m:
return a;
default:
switch (a = a && a.$$typeof, a) {
case h:
case k:
case p:
case n:
case g:
return a;
default:
return t;
}
}
case c:
return t;
}
}
}
var z = g;
var A = b;
var B = k;
var C = d;
var D = p;
var E = n;
var F = c;
var G = f;
var H = e;
var I = l;
exports.ContextConsumer = h;
exports.ContextProvider = z;
exports.Element = A;
exports.ForwardRef = B;
exports.Fragment = C;
exports.Lazy = D;
exports.Memo = E;
exports.Portal = F;
exports.Profiler = G;
exports.StrictMode = H;
exports.Suspense = I;
exports.isAsyncMode = function() {
return false;
};
exports.isConcurrentMode = function() {
return false;
};
exports.isContextConsumer = function(a) {
return y(a) === h;
};
exports.isContextProvider = function(a) {
return y(a) === g;
};
exports.isElement = function(a) {
return "object" === typeof a && null !== a && a.$$typeof === b;
};
exports.isForwardRef = function(a) {
return y(a) === k;
};
exports.isFragment = function(a) {
return y(a) === d;
};
exports.isLazy = function(a) {
return y(a) === p;
};
exports.isMemo = function(a) {
return y(a) === n;
};
exports.isPortal = function(a) {
return y(a) === c;
};
exports.isProfiler = function(a) {
return y(a) === f;
};
exports.isStrictMode = function(a) {
return y(a) === e;
};
exports.isSuspense = function(a) {
return y(a) === l;
};
exports.isValidElementType = function(a) {
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === v || a === e || a === l || a === m || a === w || "object" === typeof a && null !== a && (a.$$typeof === p || a.$$typeof === n || a.$$typeof === g || a.$$typeof === h || a.$$typeof === k || a.$$typeof === u || a.$$typeof === q || a[0] === r) ? true : false;
};
exports.typeOf = y;
}
});
// ../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.development.js
var require_react_is_development = __commonJS({
"../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.development.js"(exports) {
if (process.env.NODE_ENV !== "production") {
(function() {
var REACT_ELEMENT_TYPE = 60103;
var REACT_PORTAL_TYPE = 60106;
var REACT_FRAGMENT_TYPE = 60107;
var REACT_STRICT_MODE_TYPE = 60108;
var REACT_PROFILER_TYPE = 60114;
var REACT_PROVIDER_TYPE = 60109;
var REACT_CONTEXT_TYPE = 60110;
var REACT_FORWARD_REF_TYPE = 60112;
var REACT_SUSPENSE_TYPE = 60113;
var REACT_SUSPENSE_LIST_TYPE = 60120;
var REACT_MEMO_TYPE = 60115;
var REACT_LAZY_TYPE = 60116;
var REACT_BLOCK_TYPE = 60121;
var REACT_SERVER_BLOCK_TYPE = 60122;
var REACT_FUNDAMENTAL_TYPE = 60117;
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
var REACT_LEGACY_HIDDEN_TYPE = 60131;
if (typeof Symbol === "function" && Symbol.for) {
var symbolFor = Symbol.for;
REACT_ELEMENT_TYPE = symbolFor("react.element");
REACT_PORTAL_TYPE = symbolFor("react.portal");
REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
REACT_PROFILER_TYPE = symbolFor("react.profiler");
REACT_PROVIDER_TYPE = symbolFor("react.provider");
REACT_CONTEXT_TYPE = symbolFor("react.context");
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
REACT_MEMO_TYPE = symbolFor("react.memo");
REACT_LAZY_TYPE = symbolFor("react.lazy");
REACT_BLOCK_TYPE = symbolFor("react.block");
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
symbolFor("react.scope");
symbolFor("react.opaque.id");
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
symbolFor("react.offscreen");
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
}
var enableScopeAPI = false;
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
return true;
}
if (typeof type === "object" && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
return true;
}
}
return false;
}
function typeOf(object) {
if (typeof object === "object" && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return void 0;
}
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true;
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
}
}
return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true;
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
}
}
return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement2(object) {
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement2;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
})();
}
}
});
// ../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.js
var require_react_is = __commonJS({
"../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.js"(exports, module2) {
if (process.env.NODE_ENV === "production") {
module2.exports = require_react_is_production_min();
} else {
module2.exports = require_react_is_development();
}
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactElement.js
var require_ReactElement = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactElement.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var ReactIs = _interopRequireWildcard(require_react_is());
var _markup = require_markup();
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop2) {
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interopRequireWildcard(obj, nodeInterop) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return { default: obj };
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
var getChildren = (arg, children = []) => {
if (Array.isArray(arg)) {
arg.forEach((item) => {
getChildren(item, children);
});
} else if (arg != null && arg !== false) {
children.push(arg);
}
return children;
};
var getType = (element) => {
const type = element.type;
if (typeof type === "string") {
return type;
}
if (typeof type === "function") {
return type.displayName || type.name || "Unknown";
}
if (ReactIs.isFragment(element)) {
return "React.Fragment";
}
if (ReactIs.isSuspense(element)) {
return "React.Suspense";
}
if (typeof type === "object" && type !== null) {
if (ReactIs.isContextProvider(element)) {
return "Context.Provider";
}
if (ReactIs.isContextConsumer(element)) {
return "Context.Consumer";
}
if (ReactIs.isForwardRef(element)) {
if (type.displayName) {
return type.displayName;
}
const functionName = type.render.displayName || type.render.name || "";
return functionName !== "" ? "ForwardRef(" + functionName + ")" : "ForwardRef";
}
if (ReactIs.isMemo(element)) {
const functionName = type.displayName || type.type.displayName || type.type.name || "";
return functionName !== "" ? "Memo(" + functionName + ")" : "Memo";
}
}
return "UNDEFINED";
};
var getPropKeys = (element) => {
const { props } = element;
return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
};
var serialize = (element, config2, indentation, depth, refs, printer) => ++depth > config2.maxDepth ? (0, _markup.printElementAsLeaf)(getType(element), config2) : (0, _markup.printElement)(
getType(element),
(0, _markup.printProps)(
getPropKeys(element),
element.props,
config2,
indentation + config2.indent,
depth,
refs,
printer
),
(0, _markup.printChildren)(
getChildren(element.props.children),
config2,
indentation + config2.indent,
depth,
refs,
printer
),
config2,
indentation
);
exports.serialize = serialize;
var test = (val) => val != null && ReactIs.isElement(val);
exports.test = test;
var plugin = {
serialize,
test
};
var _default = plugin;
exports.default = _default;
}
});
// ../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactTestComponent.js
var require_ReactTestComponent = __commonJS({
"../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.test = exports.serialize = exports.default = void 0;
var _markup = require_markup();
var global2 = function() {
if (typeof globalThis !== "undefined") {
return globalThis;
} else if (typeof global2 !== "undefined") {
return global2;
} else if (typeof self !== "undefined") {
return self;
} else if (typeof window !== "undefined") {
return window;
} else {
return Function("return this")();
}
}();
var Symbol2 = global2["jest-symbol-do-not-touch"] || global2.Symbol;
var testSymbol = typeof Symbol2 === "function" && Symbol2.for ? Symbol2.for("react.test.json") : 245830487;
var getPropKeys = (object) => {
const { props } = object;
return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
};
var serialize = (object, config2, indentation, depth, refs, printer) => ++depth > config2.maxDepth ? (0, _markup.printElementAsLeaf)(object.type, config2) : (0, _markup.printElement)(
object.type,
object.props ? (0, _markup.printProps)(
getPropKeys(object),
object.props,
config2,
indentation + config2.indent,
depth,
refs,
printer
) : "",
object.children ? (0, _markup.printChildren)(
object.children,
config2,
indentation + config2.indent,
depth,
refs,
printer
) : "",
config2,
indentation
);
exports.serialize = serialize;
var test = (val) => val && val.$$type