UNPKG

mastercache

Version:

Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers

1,462 lines (1,440 loc) 254 kB
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 __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. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // ../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/branding.js var require_branding = __commonJS({ "../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/branding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // ../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/messages.js var require_messages = __commonJS({ "../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/messages.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var inverted = Symbol("inverted"); var expectNull = Symbol("expectNull"); var expectUndefined = Symbol("expectUndefined"); var expectNumber = Symbol("expectNumber"); var expectString = Symbol("expectString"); var expectBoolean = Symbol("expectBoolean"); var expectVoid = Symbol("expectVoid"); var expectFunction = Symbol("expectFunction"); var expectObject = Symbol("expectObject"); var expectArray = Symbol("expectArray"); var expectSymbol = Symbol("expectSymbol"); var expectAny = Symbol("expectAny"); var expectUnknown = Symbol("expectUnknown"); var expectNever = Symbol("expectNever"); var expectNullable = Symbol("expectNullable"); var expectBigInt = Symbol("expectBigInt"); } }); // ../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/overloads.js var require_overloads = __commonJS({ "../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/overloads.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // ../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/utils.js var require_utils = __commonJS({ "../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var secret = Symbol("secret"); var mismatch = Symbol("mismatch"); var avalue = Symbol("avalue"); } }); // ../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/index.js var require_dist = __commonJS({ "../../node_modules/.pnpm/expect-type@1.1.0/node_modules/expect-type/dist/index.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m2, k); if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m2[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) { for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m2, p3); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.expectTypeOf = void 0; __exportStar(require_branding(), exports2); __exportStar(require_messages(), exports2); __exportStar(require_overloads(), exports2); __exportStar(require_utils(), exports2); var fn = () => true; var expectTypeOf2 = (_actual) => { const nonFunctionProperties = [ "parameters", "returns", "resolves", "not", "items", "constructorParameters", "thisParameter", "instance", "guards", "asserts", "branded" ]; const obj = { /* eslint-disable @typescript-eslint/no-unsafe-assignment */ toBeAny: fn, toBeUnknown: fn, toBeNever: fn, toBeFunction: fn, toBeObject: fn, toBeArray: fn, toBeString: fn, toBeNumber: fn, toBeBoolean: fn, toBeVoid: fn, toBeSymbol: fn, toBeNull: fn, toBeUndefined: fn, toBeNullable: fn, toBeBigInt: fn, toMatchTypeOf: fn, toEqualTypeOf: fn, toBeConstructibleWith: fn, toBeCallableWith: exports2.expectTypeOf, extract: exports2.expectTypeOf, exclude: exports2.expectTypeOf, pick: exports2.expectTypeOf, omit: exports2.expectTypeOf, toHaveProperty: exports2.expectTypeOf, parameter: exports2.expectTypeOf }; const getterProperties = nonFunctionProperties; getterProperties.forEach((prop) => Object.defineProperty(obj, prop, { get: () => (0, exports2.expectTypeOf)({}) })); return obj; }; exports2.expectTypeOf = expectTypeOf2; } }); // src/test-suite.ts var test_suite_exports = {}; __export(test_suite_exports, { registerCacheDriverTestSuite: () => registerCacheDriverTestSuite }); module.exports = __toCommonJS(test_suite_exports); // tests/helpers/driver-test-suite.ts var import_promises = require("timers/promises"); // ../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js var f = { reset: [0, 0], bold: [1, 22, "\x1B[22m\x1B[1m"], dim: [2, 22, "\x1B[22m\x1B[2m"], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29], black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39], bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] }; var h = Object.entries(f); function a(n) { return String(n); } a.open = ""; a.close = ""; function C(n = false) { let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || []; return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome; } function p(n = false) { let e = C(n), i = (r2, t, c, o) => { let l = "", s = 0; do l += r2.substring(s, o) + c, s = o + t.length, o = r2.indexOf(t, s); while (~o); return l + r2.substring(s); }, g = (r2, t, c = r2) => { let o = (l) => { let s = String(l), b = s.indexOf(t, r2.length); return ~b ? r2 + i(s, t, c, b) + t : r2 + s + t; }; return o.open = r2, o.close = t, o; }, u = { isColorSupported: e }, d = (r2) => `\x1B[${r2}m`; for (let [r2, t] of h) u[r2] = e ? g( d(t[0]), d(t[1]), t[2] ) : a; return u; } // ../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js var import_tty = require("tty"); var p2 = p((0, import_tty.isatty)(1)); // ../../node_modules/.pnpm/@vitest+pretty-format@2.1.8/node_modules/@vitest/pretty-format/dist/index.js function getKeysOfEnumerableProperties(object, compareKeys) { const rawKeys = Object.keys(object); const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys); if (Object.getOwnPropertySymbols) { for (const symbol of Object.getOwnPropertySymbols(object)) { if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) { keys.push(symbol); } } } return keys; } function printIteratorEntries(iterator, config2, indentation, depth, refs, printer, separator = ": ") { let result = ""; let width = 0; let current = iterator.next(); if (!current.done) { result += config2.spacingOuter; const indentationNext = indentation + config2.indent; while (!current.done) { result += indentationNext; if (width++ === config2.maxWidth) { result += "\u2026"; break; } const name = printer( current.value[0], config2, indentationNext, depth, refs ); const value = printer( current.value[1], config2, indentationNext, depth, refs ); result += 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 width = 0; let current = iterator.next(); if (!current.done) { result += config2.spacingOuter; const indentationNext = indentation + config2.indent; while (!current.done) { result += indentationNext; if (width++ === config2.maxWidth) { result += "\u2026"; break; } result += 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 = ""; list = list instanceof ArrayBuffer ? new DataView(list) : list; const isDataView = (l) => l instanceof DataView; const length = isDataView(list) ? list.byteLength : list.length; if (length > 0) { result += config2.spacingOuter; const indentationNext = indentation + config2.indent; for (let i = 0; i < length; i++) { result += indentationNext; if (i === config2.maxWidth) { result += "\u2026"; break; } if (isDataView(list) || i in list) { result += printer( isDataView(list) ? list.getInt8(i) : list[i], config2, indentationNext, depth, refs ); } if (i < 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 > 0) { 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; } var asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621; var SPACE$2 = " "; var serialize$5 = (val, config2, indentation, depth, refs, printer) => { const stringedValue = val.toString(); if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") { if (++depth > config2.maxDepth) { return `[${stringedValue}]`; } return `${stringedValue + SPACE$2}[${printListItems( val.sample, config2, indentation, depth, refs, printer )}]`; } if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") { if (++depth > config2.maxDepth) { return `[${stringedValue}]`; } return `${stringedValue + SPACE$2}{${printObjectProperties( val.sample, config2, indentation, depth, refs, printer )}}`; } if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") { return stringedValue + SPACE$2 + printer(val.sample, config2, indentation, depth, refs); } if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") { return stringedValue + SPACE$2 + printer(val.sample, config2, indentation, depth, refs); } if (typeof val.toAsymmetricMatcher !== "function") { throw new TypeError( `Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()` ); } return val.toAsymmetricMatcher(); }; var test$5 = (val) => val && val.$$typeof === asymmetricMatcher; var plugin$5 = { serialize: serialize$5, test: test$5 }; var SPACE$1 = " "; var OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]); var ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/; function testName(name) { return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name); } var test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name); function isNamedNodeMap(collection) { return collection.constructor.name === "NamedNodeMap"; } var serialize$4 = (collection, config2, indentation, depth, refs, printer) => { const name = collection.constructor.name; if (++depth > config2.maxDepth) { return `[${name}]`; } return (config2.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties( isNamedNodeMap(collection) ? [...collection].reduce( (props, attribute) => { props[attribute.name] = attribute.value; return props; }, {} ) : { ...collection }, config2, indentation, depth, refs, printer )}}` : `[${printListItems( [...collection], config2, indentation, depth, refs, printer )}]`); }; var plugin$4 = { serialize: serialize$4, test: test$4 }; function escapeHTML(str) { return str.replaceAll("<", "&lt;").replaceAll(">", "&gt;"); } function printProps(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.includes("\n")) { 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(""); } function printChildren(children, config2, indentation, depth, refs, printer) { return children.map( (child) => config2.spacingOuter + indentation + (typeof child === "string" ? printText(child, config2) : printer(child, config2, indentation, depth, refs)) ).join(""); } function printText(text, config2) { const contentColor = config2.colors.content; return contentColor.open + escapeHTML(text) + contentColor.close; } function printComment(comment, config2) { const commentColor = config2.colors.comment; return `${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`; } function printElement(type3, printedProps, printedChildren, config2, indentation) { const tagColor = config2.colors.tag; return `${tagColor.open}<${type3}${printedProps && tagColor.close + printedProps + config2.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config2.spacingOuter}${indentation}${tagColor.open}</${type3}` : `${printedProps && !config2.min ? "" : " "}/`}>${tagColor.close}`; } function printElementAsLeaf(type3, config2) { const tagColor = config2.colors.tag; return `${tagColor.open}<${type3}${tagColor.close} \u2026${tagColor.open} />${tagColor.close}`; } var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; var FRAGMENT_NODE = 11; var ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/; function testHasAttribute(val) { try { return typeof val.hasAttribute === "function" && val.hasAttribute("is"); } catch { return false; } } function testNode(val) { const constructorName = val.constructor.name; const { nodeType, tagName } = val; const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val); return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment"; } var test$3 = (val) => { var _a; return ((_a = val == null ? void 0 : val.constructor) == null ? void 0 : _a.name) && testNode(val); }; function nodeIsText(node) { return node.nodeType === TEXT_NODE; } function nodeIsComment(node) { return node.nodeType === COMMENT_NODE; } function nodeIsFragment(node) { return node.nodeType === FRAGMENT_NODE; } var serialize$3 = (node, config2, indentation, depth, refs, printer) => { if (nodeIsText(node)) { return printText(node.data, config2); } if (nodeIsComment(node)) { return printComment(node.data, config2); } const type3 = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase(); if (++depth > config2.maxDepth) { return printElementAsLeaf(type3, config2); } return printElement( type3, printProps( nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(), nodeIsFragment(node) ? {} : [...node.attributes].reduce( (props, attribute) => { props[attribute.name] = attribute.value; return props; }, {} ), config2, indentation + config2.indent, depth, refs, printer ), printChildren( Array.prototype.slice.call(node.childNodes || node.children), config2, indentation + config2.indent, depth, refs, printer ), config2, indentation ); }; var plugin$3 = { serialize: serialize$3, test: test$3 }; 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"; function printImmutableEntries(val, config2, indentation, depth, refs, printer, type3) { return ++depth > config2.maxDepth ? printAsLeaf(getImmutableName(type3)) : `${getImmutableName(type3) + SPACE}{${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 }; } }; } function printImmutableRecord(val, config2, indentation, depth, refs, printer) { const name = getImmutableName(val._name || "Record"); return ++depth > config2.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries( getRecordEntries(val), config2, indentation, depth, refs, printer )}}`; } function 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 ? printIteratorEntries( val.entries(), config2, indentation, depth, refs, printer ) : LAZY}}`; } return `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues( val.values(), config2, indentation, depth, refs, printer ) : LAZY}]`; } function printImmutableValues(val, config2, indentation, depth, refs, printer, type3) { return ++depth > config2.maxDepth ? printAsLeaf(getImmutableName(type3)) : `${getImmutableName(type3) + SPACE}[${printIteratorValues( val.values(), config2, indentation, depth, refs, printer )}]`; } var serialize$2 = (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); }; var test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true); var plugin$2 = { serialize: serialize$2, test: test$2 }; var reactIs = { exports: {} }; var reactIs_production_min = {}; var hasRequiredReactIs_production_min; function requireReactIs_production_min() { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h2 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p3 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; u = Symbol.for("react.module.reference"); function v(a2) { if ("object" === typeof a2 && null !== a2) { var r2 = a2.$$typeof; switch (r2) { case b: switch (a2 = a2.type, a2) { case d: case f2: case e: case m2: case n: return a2; default: switch (a2 = a2 && a2.$$typeof, a2) { case k: case h2: case l: case q: case p3: case g: return a2; default: return r2; } } case c: return r2; } } } reactIs_production_min.ContextConsumer = h2; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; reactIs_production_min.ForwardRef = l; reactIs_production_min.Fragment = d; reactIs_production_min.Lazy = q; reactIs_production_min.Memo = p3; reactIs_production_min.Portal = c; reactIs_production_min.Profiler = f2; reactIs_production_min.StrictMode = e; reactIs_production_min.Suspense = m2; reactIs_production_min.SuspenseList = n; reactIs_production_min.isAsyncMode = function() { return false; }; reactIs_production_min.isConcurrentMode = function() { return false; }; reactIs_production_min.isContextConsumer = function(a2) { return v(a2) === h2; }; reactIs_production_min.isContextProvider = function(a2) { return v(a2) === g; }; reactIs_production_min.isElement = function(a2) { return "object" === typeof a2 && null !== a2 && a2.$$typeof === b; }; reactIs_production_min.isForwardRef = function(a2) { return v(a2) === l; }; reactIs_production_min.isFragment = function(a2) { return v(a2) === d; }; reactIs_production_min.isLazy = function(a2) { return v(a2) === q; }; reactIs_production_min.isMemo = function(a2) { return v(a2) === p3; }; reactIs_production_min.isPortal = function(a2) { return v(a2) === c; }; reactIs_production_min.isProfiler = function(a2) { return v(a2) === f2; }; reactIs_production_min.isStrictMode = function(a2) { return v(a2) === e; }; reactIs_production_min.isSuspense = function(a2) { return v(a2) === m2; }; reactIs_production_min.isSuspenseList = function(a2) { return v(a2) === n; }; reactIs_production_min.isValidElementType = function(a2) { return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f2 || a2 === e || a2 === m2 || a2 === n || a2 === t || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p3 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || void 0 !== a2.getModuleId) ? true : false; }; reactIs_production_min.typeOf = v; return reactIs_production_min; } var reactIs_development = {}; var hasRequiredReactIs_development; function requireReactIs_development() { if (hasRequiredReactIs_development) return reactIs_development; hasRequiredReactIs_development = 1; if (process.env.NODE_ENV !== "production") { (function() { var REACT_ELEMENT_TYPE = Symbol.for("react.element"); var REACT_PORTAL_TYPE = Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); var REACT_MEMO_TYPE = Symbol.for("react.memo"); var REACT_LAZY_TYPE = Symbol.for("react.lazy"); var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); var enableScopeAPI = false; var enableCacheElement = false; var enableTransitionTracing = false; var enableLegacyHidden = false; var enableDebugTracing = false; var REACT_MODULE_REFERENCE; { REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); } function isValidElementType(type3) { if (typeof type3 === "string" || typeof type3 === "function") { return true; } if (type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || enableDebugTracing || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type3 === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { return true; } if (typeof type3 === "object" && type3 !== null) { if (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_PROVIDER_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type3.$$typeof === REACT_MODULE_REFERENCE || type3.getModuleId !== void 0) { return true; } } return false; } function typeOf(object) { if (typeof object === "object" && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type3 = object.type; switch (type3) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: case REACT_SUSPENSE_LIST_TYPE: return type3; default: var $$typeofType = type3 && type3.$$typeof; switch ($$typeofType) { case REACT_SERVER_CONTEXT_TYPE: 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 SuspenseList = REACT_SUSPENSE_LIST_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 isElement(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; } function isSuspenseList(object) { return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; } reactIs_development.ContextConsumer = ContextConsumer; reactIs_development.ContextProvider = ContextProvider; reactIs_development.Element = Element; reactIs_development.ForwardRef = ForwardRef; reactIs_development.Fragment = Fragment; reactIs_development.Lazy = Lazy; reactIs_development.Memo = Memo; reactIs_development.Portal = Portal; reactIs_development.Profiler = Profiler; reactIs_development.StrictMode = StrictMode; reactIs_development.Suspense = Suspense; reactIs_development.SuspenseList = SuspenseList; reactIs_development.isAsyncMode = isAsyncMode; reactIs_development.isConcurrentMode = isConcurrentMode; reactIs_development.isContextConsumer = isContextConsumer; reactIs_development.isContextProvider = isContextProvider; reactIs_development.isElement = isElement; reactIs_development.isForwardRef = isForwardRef; reactIs_development.isFragment = isFragment; reactIs_development.isLazy = isLazy; reactIs_development.isMemo = isMemo; reactIs_development.isPortal = isPortal; reactIs_development.isProfiler = isProfiler; reactIs_development.isStrictMode = isStrictMode; reactIs_development.isSuspense = isSuspense; reactIs_development.isSuspenseList = isSuspenseList; reactIs_development.isValidElementType = isValidElementType; reactIs_development.typeOf = typeOf; })(); } return reactIs_development; } var hasRequiredReactIs; function requireReactIs() { if (hasRequiredReactIs) return reactIs.exports; hasRequiredReactIs = 1; if (process.env.NODE_ENV === "production") { reactIs.exports = requireReactIs_production_min(); } else { reactIs.exports = requireReactIs_development(); } return reactIs.exports; } var reactIsExports = requireReactIs(); function getChildren(arg, children = []) { if (Array.isArray(arg)) { for (const item of arg) { getChildren(item, children); } } else if (arg != null && arg !== false && arg !== "") { children.push(arg); } return children; } function getType(element) { const type3 = element.type; if (typeof type3 === "string") { return type3; } if (typeof type3 === "function") { return type3.displayName || type3.name || "Unknown"; } if (reactIsExports.isFragment(element)) { return "React.Fragment"; } if (reactIsExports.isSuspense(element)) { return "React.Suspense"; } if (typeof type3 === "object" && type3 !== null) { if (reactIsExports.isContextProvider(element)) { return "Context.Provider"; } if (reactIsExports.isContextConsumer(element)) { return "Context.Consumer"; } if (reactIsExports.isForwardRef(element)) { if (type3.displayName) { return type3.displayName; } const functionName = type3.render.displayName || type3.render.name || ""; return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`; } if (reactIsExports.isMemo(element)) { const functionName = type3.displayName || type3.type.displayName || type3.type.name || ""; return functionName === "" ? "Memo" : `Memo(${functionName})`; } } return "UNDEFINED"; } function getPropKeys$1(element) { const { props } = element; return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort(); } var serialize$1 = (element, config2, indentation, depth, refs, printer) => ++depth > config2.maxDepth ? printElementAsLeaf(getType(element), config2) : printElement( getType(element), printProps( getPropKeys$1(element), element.props, config2, indentation + config2.indent, depth, refs, printer ), printChildren( getChildren(element.props.children), config2, indentation + config2.indent, depth, refs, printer ), config2, indentation ); var test$1 = (val) => val != null && reactIsExports.isElement(val); var plugin$1 = { serialize: serialize$1, test: test$1 }; var testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487; function 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 ? printElementAsLeaf(object.type, config2) : printElement( object.type, object.props ? printProps( getPropKeys(object), object.props, config2, indentation + config2.indent, depth, refs, printer ) : "", object.children ? printChildren( object.children, config2, indentation + config2.indent, depth, refs, printer ) : "", config2, indentation ); var test = (val) => val && val.$$typeof === testSymbol; var plugin = { serialize, test }; var toISOString = Date.prototype.toISOString; var errorToString = Error.prototype.toString; var regExpToString = RegExp.prototype.toString; var DEFAULT_THEME = { comment: "gray", content: "reset", prop: "yellow", tag: "cyan", value: "green" }; var DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME); var DEFAULT_OPTIONS = { callToJSON: true, compareKeys: void 0, escapeRegex: false, escapeString: true, highlight: false, indent: 2, maxDepth: Number.POSITIVE_INFINITY, maxWidth: Number.POSITIVE_INFINITY, min: false, plugins: [], printBasicPrototype: true, printFunctionName: true, theme: DEFAULT_THEME }; var plugins = { AsymmetricMatcher: plugin$5, DOMCollection: plugin$4, DOMElement: plugin$3, Immutable: plugin$2, ReactElement: plugin$1, ReactTestComponent: plugin }; // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/helpers.js var ansiColors = { bold: ["1", "22"], dim: ["2", "22"], italic: ["3", "23"], underline: ["4", "24"], // 5 & 6 are blinking inverse: ["7", "27"], hidden: ["8", "28"], strike: ["9", "29"], // 10-20 are fonts // 21-29 are resets for 1-9 black: ["30", "39"], red: ["31", "39"], green: ["32", "39"], yellow: ["33", "39"], blue: ["34", "39"], magenta: ["35", "39"], cyan: ["36", "39"], white: ["37", "39"], brightblack: ["30;1", "39"], brightred: ["31;1", "39"], brightgreen: ["32;1", "39"], brightyellow: ["33;1", "39"], brightblue: ["34;1", "39"], brightmagenta: ["35;1", "39"], brightcyan: ["36;1", "39"], brightwhite: ["37;1", "39"], grey: ["90", "39"] }; var styles = { special: "cyan", number: "yellow", bigint: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", symbol: "green", date: "magenta", regexp: "red" }; var truncator = "\u2026"; function colorise(value, styleType) { const color = ansiColors[styles[styleType]] || ansiColors[styleType] || ""; if (!color) { return String(value); } return `\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m`; } function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [], // eslint-disable-next-line no-shadow truncate: truncate3 = Infinity, stylize = String } = {}, inspect4) { const options = { showHidden: Boolean(showHidden), depth: Number(depth), colors: Boolean(colors), customInspect: Boolean(customInspect), showProxy: Boolean(showProxy), maxArrayLength: Number(maxArrayLength), breakLength: Number(breakLength), truncate: Number(truncate3), seen, inspect: inspect4, stylize }; if (options.colors) { options.stylize = colorise; } return options; } function isHighSurrogate(char) { return char >= "\uD800" && char <= "\uDBFF"; } function truncate(string, length, tail = truncator) { string = String(string); const tailLength = tail.length; const stringLength = string.length; if (tailLength > length && stringLength > tailLength) { return tail; } if (stringLength > length && stringLength > tailLength) { let end = length - tailLength; if (end > 0 && isHighSurrogate(string[end - 1])) { end = end - 1; } return `${string.slice(0, end)}${tail}`; } return string; } function inspectList(list, options, inspectItem, separator = ", ") { inspectItem = inspectItem || options.inspect; const size = list.length; if (size === 0) return ""; const originalLength = options.truncate; let output = ""; let peek = ""; let truncated = ""; for (let i = 0; i < size; i += 1) { const last = i + 1 === list.length; const secondToLast = i + 2 === list.length; truncated = `${truncator}(${list.length - i})`; const value = list[i]; options.truncate = originalLength - output.length - (last ? 0 : separator.length); const string = peek || inspectItem(value, options) + (last ? "" : separator); const nextLength = output.length + string.length; const truncatedLength = nextLength + truncated.length; if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) { break; } if (!last && !secondToLast && truncatedLength > originalLength) { break; } peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator); if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) { break; } output += string; if (!last && !secondToLast && nextLength + peek.length >= originalLength) { truncated = `${truncator}(${list.length - i - 1})`; break; } truncated = ""; } return `${output}${truncated}`; } function quoteComplexKey(key) { if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) { return key; } return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); } function inspectProperty([key, value], options) { options.truncate -= 2; if (typeof key === "string") { key = quoteComplexKey(key); } else if (typeof key !== "number") { key = `[${options.inspect(key, options)}]`; } options.truncate -= key.length; value = options.inspect(value, options); return `${key}: ${value}`; } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/array.js function inspectArray(array, options) { const nonIndexProperties = Object.keys(array).slice(array.length); if (!array.length && !nonIndexProperties.length) return "[]"; options.truncate -= 4; const listContents = inspectList(array, options); options.truncate -= listContents.length; let propertyContents = ""; if (nonIndexProperties.length) { propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty); } return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`; } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/typedarray.js var getArrayName = (array) => { if (typeof Buffer === "function" && array instanceof Buffer) { return "Buffer"; } if (array[Symbol.toStringTag]) { return array[Symbol.toStringTag]; } return array.constructor.name; }; function inspectTypedArray(array, options) { const name = getArrayName(array); options.truncate -= name.length + 4; const nonIndexProperties = Object.keys(array).slice(array.length); if (!array.length && !nonIndexProperties.length) return `${name}[]`; let output = ""; for (let i = 0; i < array.length; i++) { const string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`; options.truncate -= string.length; if (array[i] !== array.length && options.truncate <= 3) { output += `${truncator}(${array.length - array[i] + 1})`; break; } output += string; } let propertyContents = ""; if (nonIndexProperties.length) { propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty); } return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`; } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/date.js function inspectDate(dateObject, options) { const stringRepresentation = dateObject.toJSON(); if (stringRepresentation === null) { return "Invalid Date"; } const split = stringRepresentation.split("T"); const date = split[0]; return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/function.js function inspectFunction(func, options) { const functionType = func[Symbol.toStringTag] || "Function"; const name = func.name; if (!name) { return options.stylize(`[${functionType}]`, "special"); } return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/map.js function inspectMapEntry([key, value], options) { options.truncate -= 4; key = options.inspect(key, options); options.truncate -= key.length; value = options.inspect(value, options); return `${key} => ${value}`; } function mapToEntries(map) { const entries = []; map.forEach((value, key) => { entries.push([key, value]); }); return entries; } function inspectMap(map, options) { const size = map.size - 1; if (size <= 0) { return "Map{}"; } options.truncate -= 7; return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`; } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/number.js var isNaN = Number.isNaN || ((i) => i !== i); function inspectNumber(number, options) { if (isNaN(number)) { return options.stylize("NaN", "number"); } if (number === Infinity) { return options.stylize("Infinity", "number"); } if (number === -Infinity) { return options.stylize("-Infinity", "number"); } if (number === 0) { return options.stylize(1 / number === Infinity ? "+0" : "-0", "number"); } return options.stylize(truncate(String(number), options.truncate), "number"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/bigint.js function inspectBigInt(number, options) { let nums = truncate(number.toString(), options.truncate - 1); if (nums !== truncator) nums += "n"; return options.stylize(nums, "bigint"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/regexp.js function inspectRegExp(value, options) { const flags = value.toString().split("/")[2]; const sourceLength = options.truncate - (2 + flags.length); const source = value.source; return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/set.js function arrayFromSet(set2) { const values = []; set2.forEach((value) => { values.push(value); }); return values; } function inspectSet(set2, options) { if (set2.size === 0) return "Set{}"; options.truncate -= 7; return `Set{ ${inspectList(arrayFromSet(set2), options)} }`; } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/string.js var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g"); var escapeCharacters = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", "'": "\\'", "\\": "\\\\" }; var hex = 16; var unicodeLength = 4; function escape(char) { return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`; } function inspectString(string, options) { if (stringEscapeChars.test(string)) { string = string.replace(stringEscapeChars, escape); } return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string"); } // ../../node_modules/.pnpm/loupe@3.1.2/node_modules/loupe/lib/symbol.js function inspectSymbol(value) { if ("description" in Symbol.prototype) { return value.description