{
"version": 3,
"sources": ["../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/blocks.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/inlines.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/marks.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/schemaConstraints.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/types.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/nodeTypes.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/emptyDocument.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/helpers.js", "../../../../../../node_modules/is-plain-obj/index.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/errors.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/assert.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/node.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/path.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/text.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/validator/index.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/node_modules/@contentful/rich-text-types/dist/cjs/index.js", "../../../../../../node_modules/@contentful/rich-text-react-renderer/src/util/appendKeyToValidElement.ts", "../../../../../../node_modules/@contentful/rich-text-react-renderer/src/util/nodeListToReactComponents.tsx", "../../../../../../node_modules/@contentful/rich-text-react-renderer/src/index.tsx", "../../../../../../node_modules/@contentful/rich-text-types/src/blocks.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/inlines.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/marks.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/schemaConstraints.ts", "../../../../../../node_modules/@contentful/rich-text-types/dist/types.js", "../../../../../../node_modules/@contentful/rich-text-types/dist/nodeTypes.js", "../../../../../../node_modules/@contentful/rich-text-types/src/emptyDocument.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/helpers.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/schemas/index.ts", "../../../../../../node_modules/@contentful/rich-text-types/src/index.ts", "../../../../../../internal/esbuild/entrypoints/modern/classic/discover.ts", "sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=4ee742ea-360e-4564-a8f6-828de5edd103", "../../../../../../internal/esbuild/entrypoints/modern/classic/discover.ts", "../../src/modern/features/discover/index.tsx", "../../src/modern/components/Menu/Sausage/index.js", "../../src/modern/components/Menu/Sausage/item.js", "../../src/modern/components/Menu/Sausage/list.js", "../../src/modern/features/discover/utils/data.ts", "../../src/modern/features/discover/hooks/usePartnersOperation.ts", "../../src/modern/features/discover/UFE.ts", "../../src/modern/features/discover/components/Partners.tsx", "../../../../../../owl-nest/common/rich-text/src/RichText.tsx", "../../src/modern/features/discover/views/SearchSection.tsx", "../../src/modern/features/discover/hooks/useSearch.ts", "../../src/modern/features/discover/utils/filters.ts", "../../src/modern/features/discover/components/searchbar/index.tsx", "../../src/modern/features/discover/components/searchbar/AutosizeInput.tsx", "../../src/modern/features/discover/components/filtersbar/index.tsx", "../../src/modern/features/discover/components/filtersbar/MobileFiltersList.tsx", "../../src/modern/features/discover/components/filtersbar/HorizontalScroller.tsx", "../../src/modern/features/discover/components/filtersbar/styles.ts", "../../src/modern/features/discover/components/filtersbar/DesktopFiltersList.tsx", "../../src/modern/features/discover/components/filtersbar/FilterOptionsList.tsx", "../../src/modern/features/discover/components/noresults/index.tsx", "../../src/modern/features/discover/components/results/index.tsx"],
"sourcesContent": ["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"BLOCKS\", {\n enumerable: true,\n get: function() {\n return BLOCKS;\n }\n});\nvar BLOCKS = /*#__PURE__*/ function(BLOCKS) {\n BLOCKS[\"DOCUMENT\"] = \"document\";\n BLOCKS[\"PARAGRAPH\"] = \"paragraph\";\n BLOCKS[\"HEADING_1\"] = \"heading-1\";\n BLOCKS[\"HEADING_2\"] = \"heading-2\";\n BLOCKS[\"HEADING_3\"] = \"heading-3\";\n BLOCKS[\"HEADING_4\"] = \"heading-4\";\n BLOCKS[\"HEADING_5\"] = \"heading-5\";\n BLOCKS[\"HEADING_6\"] = \"heading-6\";\n BLOCKS[\"OL_LIST\"] = \"ordered-list\";\n BLOCKS[\"UL_LIST\"] = \"unordered-list\";\n BLOCKS[\"LIST_ITEM\"] = \"list-item\";\n BLOCKS[\"HR\"] = \"hr\";\n BLOCKS[\"QUOTE\"] = \"blockquote\";\n BLOCKS[\"EMBEDDED_ENTRY\"] = \"embedded-entry-block\";\n BLOCKS[\"EMBEDDED_ASSET\"] = \"embedded-asset-block\";\n BLOCKS[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-block\";\n BLOCKS[\"TABLE\"] = \"table\";\n BLOCKS[\"TABLE_ROW\"] = \"table-row\";\n BLOCKS[\"TABLE_CELL\"] = \"table-cell\";\n BLOCKS[\"TABLE_HEADER_CELL\"] = \"table-header-cell\";\n return BLOCKS;\n}({});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"INLINES\", {\n enumerable: true,\n get: function() {\n return INLINES;\n }\n});\nvar INLINES = /*#__PURE__*/ function(INLINES) {\n INLINES[\"ASSET_HYPERLINK\"] = \"asset-hyperlink\";\n INLINES[\"EMBEDDED_ENTRY\"] = \"embedded-entry-inline\";\n INLINES[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-inline\";\n INLINES[\"ENTRY_HYPERLINK\"] = \"entry-hyperlink\";\n INLINES[\"HYPERLINK\"] = \"hyperlink\";\n INLINES[\"RESOURCE_HYPERLINK\"] = \"resource-hyperlink\";\n return INLINES;\n}({});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MARKS\", {\n enumerable: true,\n get: function() {\n return MARKS;\n }\n});\nvar MARKS = /*#__PURE__*/ function(MARKS) {\n MARKS[\"BOLD\"] = \"bold\";\n MARKS[\"ITALIC\"] = \"italic\";\n MARKS[\"UNDERLINE\"] = \"underline\";\n MARKS[\"CODE\"] = \"code\";\n MARKS[\"SUPERSCRIPT\"] = \"superscript\";\n MARKS[\"SUBSCRIPT\"] = \"subscript\";\n MARKS[\"STRIKETHROUGH\"] = \"strikethrough\";\n return MARKS;\n}({});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get CONTAINERS () {\n return CONTAINERS;\n },\n get HEADINGS () {\n return HEADINGS;\n },\n get LIST_ITEM_BLOCKS () {\n return LIST_ITEM_BLOCKS;\n },\n get TABLE_BLOCKS () {\n return TABLE_BLOCKS;\n },\n get TEXT_CONTAINERS () {\n return TEXT_CONTAINERS;\n },\n get TOP_LEVEL_BLOCKS () {\n return TOP_LEVEL_BLOCKS;\n },\n get V1_MARKS () {\n return V1_MARKS;\n },\n get V1_NODE_TYPES () {\n return V1_NODE_TYPES;\n },\n get VOID_BLOCKS () {\n return VOID_BLOCKS;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar TOP_LEVEL_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE,\n _blocks.BLOCKS.TABLE\n];\nvar LIST_ITEM_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar TABLE_BLOCKS = [\n _blocks.BLOCKS.TABLE,\n _blocks.BLOCKS.TABLE_ROW,\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n];\nvar VOID_BLOCKS = [\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar _obj;\nvar CONTAINERS = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.OL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.UL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, LIST_ITEM_BLOCKS), _define_property(_obj, _blocks.BLOCKS.QUOTE, [\n _blocks.BLOCKS.PARAGRAPH\n]), _define_property(_obj, _blocks.BLOCKS.TABLE, [\n _blocks.BLOCKS.TABLE_ROW\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.OL_LIST\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, [\n _blocks.BLOCKS.PARAGRAPH\n]), _obj);\nvar HEADINGS = [\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6\n];\nvar TEXT_CONTAINERS = [\n _blocks.BLOCKS.PARAGRAPH\n].concat(_to_consumable_array(HEADINGS));\nvar V1_NODE_TYPES = [\n _blocks.BLOCKS.DOCUMENT,\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.LIST_ITEM,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _inlines.INLINES.HYPERLINK,\n _inlines.INLINES.ENTRY_HYPERLINK,\n _inlines.INLINES.ASSET_HYPERLINK,\n _inlines.INLINES.EMBEDDED_ENTRY,\n 'text'\n];\nvar V1_MARKS = [\n _marks.MARKS.BOLD,\n _marks.MARKS.CODE,\n _marks.MARKS.ITALIC,\n _marks.MARKS.UNDERLINE\n];\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"EMPTY_DOCUMENT\", {\n enumerable: true,\n get: function() {\n return EMPTY_DOCUMENT;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar EMPTY_DOCUMENT = {\n nodeType: _blocks.BLOCKS.DOCUMENT,\n data: {},\n content: [\n {\n nodeType: _blocks.BLOCKS.PARAGRAPH,\n data: {},\n content: [\n {\n nodeType: 'text',\n value: '',\n marks: [],\n data: {}\n }\n ]\n }\n ]\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get isBlock () {\n return isBlock;\n },\n get isEmptyParagraph () {\n return isEmptyParagraph;\n },\n get isInline () {\n return isInline;\n },\n get isText () {\n return isText;\n },\n get stripEmptyTrailingParagraphFromDocument () {\n return stripEmptyTrailingParagraphFromDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction hasValue(obj, value) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;\n try {\n for(var _iterator = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var key = _step.value;\n if (value === obj[key]) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally{\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n}\nfunction isInline(node) {\n return hasValue(_inlines.INLINES, node.nodeType);\n}\nfunction isBlock(node) {\n return hasValue(_blocks.BLOCKS, node.nodeType);\n}\nfunction isText(node) {\n return node.nodeType === 'text';\n}\nfunction isEmptyParagraph(node) {\n if (node.nodeType !== _blocks.BLOCKS.PARAGRAPH) {\n return false;\n }\n if (node.content.length !== 1) {\n return false;\n }\n var textNode = node.content[0];\n return textNode.nodeType === 'text' && textNode.value === '';\n}\nfunction isValidDocument(document) {\n return document != null && (typeof document === \"undefined\" ? \"undefined\" : _type_of(document)) === 'object' && 'content' in document && Array.isArray(document.content);\n}\nvar MIN_NODES_FOR_STRIPPING = 2;\nfunction stripEmptyTrailingParagraphFromDocument(document) {\n if (!isValidDocument(document) || document.content.length < MIN_NODES_FOR_STRIPPING) {\n return document;\n }\n var lastNode = document.content[document.content.length - 1];\n if (isEmptyParagraph(lastNode)) {\n return _object_spread_props(_object_spread({}, document), {\n content: document.content.slice(0, -1)\n });\n }\n return document;\n}\n", "'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get enumError () {\n return enumError;\n },\n get maxSizeError () {\n return maxSizeError;\n },\n get minSizeError () {\n return minSizeError;\n },\n get requiredPropertyError () {\n return requiredPropertyError;\n },\n get typeMismatchError () {\n return typeMismatchError;\n },\n get unknownPropertyError () {\n return unknownPropertyError;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar typeMismatchError = function(param) {\n var path = param.path, property = param.property, typeName = param.typeName, value = param.value;\n return {\n details: 'The type of \"'.concat(property, '\" is incorrect, expected type: ').concat(typeName),\n name: 'type',\n path: path.toArray(),\n type: typeName,\n value: value\n };\n};\nvar minSizeError = function(param) {\n var min = param.min, value = param.value, path = param.path;\n return {\n name: 'size',\n min: min,\n path: path.toArray(),\n details: \"Size must be at least \".concat(min),\n value: value\n };\n};\nvar maxSizeError = function(param) {\n var max = param.max, value = param.value, path = param.path;\n return {\n name: 'size',\n max: max,\n path: path.toArray(),\n details: \"Size must be at most \".concat(max),\n value: value\n };\n};\nvar enumError = function(param) {\n var expected = param.expected, value = param.value, path = param.path;\n return {\n details: \"Value must be one of expected values\",\n name: 'in',\n expected: _to_consumable_array(expected).sort(),\n path: path.toArray(),\n value: value\n };\n};\nvar unknownPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is not expected'),\n name: 'unexpected',\n path: path.toArray()\n };\n};\nvar requiredPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is required here'),\n name: 'required',\n path: path.toArray()\n };\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"ObjectAssertion\", {\n enumerable: true,\n get: function() {\n return ObjectAssertion;\n }\n});\nvar _isplainobj = /*#__PURE__*/ _interop_require_default(require(\"is-plain-obj\"));\nvar _errors = require(\"./errors.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar ObjectAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function ObjectAssertion(obj, path) {\n var _this = this;\n var _this1 = this;\n _class_call_check(this, ObjectAssertion);\n _define_property(this, \"obj\", void 0);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"_errors\", void 0);\n _define_property(this, \"catch\", void 0);\n _define_property(this, \"exists\", void 0);\n _define_property(this, \"object\", void 0);\n _define_property(this, \"string\", void 0);\n _define_property(this, \"number\", void 0);\n _define_property(this, \"array\", void 0);\n _define_property(this, \"enum\", void 0);\n _define_property(this, \"empty\", void 0);\n _define_property(this, \"minLength\", void 0);\n _define_property(this, \"noAdditionalProperties\", void 0);\n _define_property(this, \"each\", void 0);\n this.obj = obj;\n this.path = path;\n this._errors = [];\n this.catch = function() {\n for(var _len = arguments.length, errors = new Array(_len), _key = 0; _key < _len; _key++){\n errors[_key] = arguments[_key];\n }\n var _this__errors;\n (_this__errors = _this1._errors).push.apply(_this__errors, _to_consumable_array(errors));\n };\n this.exists = function(key) {\n if (key in _this.obj) {\n return true;\n }\n _this.catch((0, _errors.requiredPropertyError)({\n property: key,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.object = function(key) {\n var value = key ? _this.obj[key] : _this.obj;\n if (key) {\n if (!_this.exists(key)) {\n return false;\n }\n }\n if ((0, _isplainobj.default)(value)) {\n return true;\n }\n var _$path = key ? _this.path.of(key) : _this.path;\n var _ref;\n var property = (_ref = key !== null && key !== void 0 ? key : _this.path.last()) !== null && _ref !== void 0 ? _ref : 'value';\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Object',\n property: property,\n path: _$path,\n value: value\n }));\n return false;\n };\n this.string = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (typeof value === 'string') {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'String',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.number = function(key, optional) {\n var value = _this.obj[key];\n if (optional && !(key in _this.obj)) {\n return true;\n }\n if (!_this.exists(key)) {\n return false;\n }\n if (typeof value === 'number' && !Number.isNaN(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Number',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.array = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (Array.isArray(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Array',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.enum = function(key, expected) {\n var value = _this.obj[key];\n if (typeof value === 'string' && expected.includes(value)) {\n return true;\n }\n _this.catch((0, _errors.enumError)({\n expected: expected,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.empty = function(key) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length === 0) {\n return true;\n }\n _this.catch((0, _errors.maxSizeError)({\n max: 0,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.minLength = function(key, min) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length >= min) {\n return true;\n }\n _this.catch((0, _errors.minSizeError)({\n min: min,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.noAdditionalProperties = function(properties) {\n var unknowns = Object.keys(_this.obj).sort().filter(function(key) {\n return !properties.includes(key);\n });\n unknowns.forEach(function(property) {\n return _this.catch((0, _errors.unknownPropertyError)({\n property: property,\n path: _this.path.of(property)\n }));\n });\n return unknowns.length === 0;\n };\n this.each = function(key, assert) {\n if (!_this.array(key)) {\n return;\n }\n var value = _this.obj[key];\n var foundErrors = false;\n value.forEach(function(item, index) {\n if (foundErrors) {\n return;\n }\n var errors = assert(item, _this.path.of(key).of(index));\n if (errors.length > 0) {\n foundErrors = true;\n }\n _this.catch.apply(_this, _to_consumable_array(errors));\n });\n };\n }\n _create_class(ObjectAssertion, [\n {\n key: \"errors\",\n get: function get() {\n var _this = this;\n var serializeError = function(error) {\n return JSON.stringify({\n details: error.details,\n path: error.path\n });\n };\n return this._errors.filter(function(error, index) {\n return _this._errors.findIndex(function(step) {\n return serializeError(error) === serializeError(step);\n }) === index;\n });\n }\n }\n ]);\n return ObjectAssertion;\n}();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get EntityLinkAssertion () {\n return EntityLinkAssertion;\n },\n get HyperLinkAssertion () {\n return HyperLinkAssertion;\n },\n get NodeAssertion () {\n return NodeAssertion;\n },\n get VOID_CONTENT () {\n return VOID_CONTENT;\n },\n get assert () {\n return assert;\n },\n get assertLink () {\n return assertLink;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _set_prototype_of(o, p);\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n } catch (_) {}\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar VOID_CONTENT = [];\nvar NodeAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function NodeAssertion(contentRule, validateData) {\n _class_call_check(this, NodeAssertion);\n _define_property(this, \"contentRule\", void 0);\n _define_property(this, \"validateData\", void 0);\n this.contentRule = contentRule;\n this.validateData = validateData;\n }\n _create_class(NodeAssertion, [\n {\n key: \"assert\",\n value: function assert(node, path) {\n var $ = new _assert.ObjectAssertion(node, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'content'\n ]);\n var _ref = Array.isArray(this.contentRule) ? {\n nodeTypes: this.contentRule\n } : this.contentRule(node, path), nodeTypes = _ref.nodeTypes, _ref_min = _ref.min, min = _ref_min === void 0 ? 0 : _ref_min;\n if (nodeTypes.length === 0 && min > 0) {\n throw new Error(\"Invalid content rule. Cannot have enforce a 'min' of \".concat(min, \" with no nodeTypes\"));\n }\n $.minLength('content', min);\n if (nodeTypes.length === 0) {\n $.empty('content');\n } else {\n $.each('content', function(item, path) {\n var item$ = new _assert.ObjectAssertion(item, path);\n if (!item$.object()) {\n return item$.errors;\n }\n item$.enum('nodeType', nodeTypes);\n return item$.errors;\n });\n }\n if ($.object('data')) {\n var _$;\n var _this_validateData, _this;\n var _this_validateData1;\n var dataErrors = (_this_validateData1 = (_this_validateData = (_this = this).validateData) === null || _this_validateData === void 0 ? void 0 : _this_validateData.call(_this, node.data, path.of('data'))) !== null && _this_validateData1 !== void 0 ? _this_validateData1 : [];\n (_$ = $).catch.apply(_$, _to_consumable_array(dataErrors));\n }\n return $.errors;\n }\n }\n ]);\n return NodeAssertion;\n}();\nvar EntityLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(EntityLinkAssertion, NodeAssertion);\n function EntityLinkAssertion(linkType, contentNodeTypes) {\n _class_call_check(this, EntityLinkAssertion);\n var _this;\n _this = _call_super(this, EntityLinkAssertion, [\n contentNodeTypes,\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"linkType\", void 0), _define_property(_this, \"type\", void 0), _define_property(_this, \"assertLink\", void 0), _this.linkType = linkType, _this.assertLink = function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n if ($.object('target')) {\n var _$;\n var sys$ = new _assert.ObjectAssertion(data.target.sys, path.of('target').of('sys'));\n if (sys$.object()) {\n sys$.enum('type', [\n _this.type\n ]);\n sys$.enum('linkType', [\n _this.linkType\n ]);\n if (_this.type === 'Link') {\n sys$.string('id');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'id'\n ]);\n } else if (_this.type === 'ResourceLink') {\n sys$.string('urn');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'urn'\n ]);\n }\n }\n (_$ = $).catch.apply(_$, _to_consumable_array(sys$.errors));\n }\n $.noAdditionalProperties([\n 'target'\n ]);\n return $.errors;\n };\n _this.type = _this.linkType.startsWith('Contentful:') ? 'ResourceLink' : 'Link';\n return _this;\n }\n return EntityLinkAssertion;\n}(NodeAssertion);\nvar HyperLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(HyperLinkAssertion, NodeAssertion);\n function HyperLinkAssertion() {\n _class_call_check(this, HyperLinkAssertion);\n var _this;\n _this = _call_super(this, HyperLinkAssertion, [\n [\n 'text'\n ],\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"assertLink\", function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.string('uri');\n $.noAdditionalProperties([\n 'uri'\n ]);\n return $.errors;\n });\n return _this;\n }\n return HyperLinkAssertion;\n}(NodeAssertion);\nvar assert = function(contentRule, validateData) {\n return new NodeAssertion(contentRule, validateData);\n};\nvar assertLink = function(linkType, contentRule) {\n return new EntityLinkAssertion(linkType, contentRule);\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Path\", {\n enumerable: true,\n get: function() {\n return Path;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar Path = function Path() {\n \"use strict\";\n var _this = this;\n var path = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n _class_call_check(this, Path);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"of\", void 0);\n _define_property(this, \"isRoot\", void 0);\n _define_property(this, \"last\", void 0);\n _define_property(this, \"toArray\", void 0);\n this.path = path;\n this.of = function(element) {\n return new Path(_to_consumable_array(_this.path).concat([\n element\n ]));\n };\n this.isRoot = function() {\n return _this.path.length === 0;\n };\n this.last = function() {\n return _this.path[_this.path.length - 1];\n };\n this.toArray = function() {\n return _this.path;\n };\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"assertText\", {\n enumerable: true,\n get: function() {\n return assertText;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction assertText(text, path) {\n var $ = new _assert.ObjectAssertion(text, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'value',\n 'marks'\n ]);\n $.object('data');\n $.each('marks', function(mark, path) {\n var mark$ = new _assert.ObjectAssertion(mark, path);\n if (!mark$.object()) {\n return mark$.errors;\n }\n mark$.string('type');\n return mark$.errors;\n });\n $.string('value');\n return $.errors;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"validateRichTextDocument\", {\n enumerable: true,\n get: function() {\n return validateRichTextDocument;\n }\n});\nvar _blocks = require(\"../blocks.js\");\nvar _inlines = require(\"../inlines.js\");\nvar _schemaConstraints = require(\"../schemaConstraints.js\");\nvar _assert = require(\"./assert.js\");\nvar _node = require(\"./node.js\");\nvar _path = require(\"./path.js\");\nvar _text = require(\"./text.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar assertInlineOrText = (0, _node.assert)(_to_consumable_array(Object.values(_inlines.INLINES)).concat([\n 'text'\n]).sort());\nvar assertList = (0, _node.assert)([\n _blocks.BLOCKS.LIST_ITEM\n]);\nvar assertVoidEntryLink = (0, _node.assertLink)('Entry', _node.VOID_CONTENT);\nvar assertTableCell = (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.PARAGRAPH\n ],\n min: 1\n };\n}, function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.noAdditionalProperties([\n 'colspan',\n 'rowspan'\n ]);\n $.number('colspan', true);\n $.number('rowspan', true);\n return $.errors;\n});\nvar _obj;\nvar nodeValidator = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.DOCUMENT, (0, _node.assert)(_schemaConstraints.TOP_LEVEL_BLOCKS)), _define_property(_obj, _blocks.BLOCKS.PARAGRAPH, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_1, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_2, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_3, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_4, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_5, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_6, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.QUOTE, (0, _node.assert)(_schemaConstraints.CONTAINERS[_blocks.BLOCKS.QUOTE])), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ASSET, (0, _node.assertLink)('Asset', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.HR, (0, _node.assert)(_node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.OL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.UL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, (0, _node.assert)(_to_consumable_array(_schemaConstraints.LIST_ITEM_BLOCKS).sort())), _define_property(_obj, _blocks.BLOCKS.TABLE, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_ROW\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, assertTableCell), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, assertTableCell), _define_property(_obj, _inlines.INLINES.HYPERLINK, new _node.HyperLinkAssertion()), _define_property(_obj, _inlines.INLINES.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _inlines.INLINES.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _inlines.INLINES.ENTRY_HYPERLINK, (0, _node.assertLink)('Entry', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.ASSET_HYPERLINK, (0, _node.assertLink)('Asset', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.RESOURCE_HYPERLINK, (0, _node.assertLink)('Contentful:Entry', [\n 'text'\n])), _obj);\nfunction validateNode(node, path) {\n if (node.nodeType === 'text') {\n return (0, _text.assertText)(node, path);\n }\n var errors = nodeValidator[node.nodeType].assert(node, path);\n if (errors.length > 0) {\n return errors;\n }\n var $ = new _assert.ObjectAssertion(node, path);\n $.each('content', function(item, path) {\n return validateNode(item, path);\n });\n return $.errors;\n}\nvar validateRichTextDocument = function(document) {\n var path = new _path.Path();\n var $ = new _assert.ObjectAssertion(document, path);\n if ($.object()) {\n $.enum('nodeType', [\n _blocks.BLOCKS.DOCUMENT\n ]);\n }\n if ($.errors.length > 0) {\n return $.errors;\n }\n return validateNode(document, path);\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get BLOCKS () {\n return _blocks.BLOCKS;\n },\n get EMPTY_DOCUMENT () {\n return _emptyDocument.EMPTY_DOCUMENT;\n },\n get INLINES () {\n return _inlines.INLINES;\n },\n get MARKS () {\n return _marks.MARKS;\n },\n get helpers () {\n return _helpers;\n },\n get validateRichTextDocument () {\n return _index.validateRichTextDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\n_export_star(require(\"./schemaConstraints.js\"), exports);\n_export_star(require(\"./types.js\"), exports);\n_export_star(require(\"./nodeTypes.js\"), exports);\nvar _emptyDocument = require(\"./emptyDocument.js\");\nvar _helpers = /*#__PURE__*/ _interop_require_wildcard(require(\"./helpers.js\"));\nvar _index = require(\"./validator/index.js\");\nfunction _export_star(from, to) {\n Object.keys(from).forEach(function(k) {\n if (k !== \"default\" && !Object.prototype.hasOwnProperty.call(to, k)) {\n Object.defineProperty(to, k, {\n enumerable: true,\n get: function() {\n return from[k];\n }\n });\n }\n });\n return from;\n}\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {\n __proto__: null\n };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n", "import { cloneElement, isValidElement, ReactNode } from 'react';\n\nexport function appendKeyToValidElement(element: ReactNode, key: number): ReactNode {\n if (isValidElement(element) && element.key === null) {\n return cloneElement(element, { key });\n }\n return element;\n}\n", "import React, { ReactNode } from 'react';\n\nimport { helpers, Mark } from '@contentful/rich-text-types';\n\nimport { CommonNode, Options } from '..';\n\nimport { appendKeyToValidElement } from './appendKeyToValidElement';\n\nexport function nodeListToReactComponents(nodes: CommonNode[], options: Options): ReactNode {\n return nodes.map((node: CommonNode, index: number): ReactNode => {\n return appendKeyToValidElement(nodeToReactComponent(node, options), index);\n });\n}\n\nexport function nodeToReactComponent(node: CommonNode, options: Options): ReactNode {\n const { renderNode, renderMark, renderText, preserveWhitespace } = options;\n\n if (helpers.isText(node)) {\n let nodeValue: ReactNode = renderText ? renderText(node.value) : node.value;\n\n // Preserving whitespace is only supported with the default transformations.\n if (preserveWhitespace && !renderText) {\n // Preserve multiple spaces.\n nodeValue = (nodeValue as string).replace(/ {2,}/g, (match) => '\\u00A0'.repeat(match.length));\n\n // Preserve line breaks.\n const lines = (nodeValue as string).split('\\n');\n const jsxLines: (string | React.JSX.Element)[] = [];\n\n lines.forEach((line, index) => {\n jsxLines.push(line);\n if (index !== lines.length - 1) {\n jsxLines.push(
);\n }\n });\n nodeValue = jsxLines;\n }\n\n return node.marks.reduce((value: ReactNode, mark: Mark): ReactNode => {\n if (!renderMark[mark.type]) {\n return value;\n }\n return renderMark[mark.type](value);\n }, nodeValue);\n } else {\n const children: ReactNode = nodeListToReactComponents(node.content, options);\n if (!node.nodeType || !renderNode[node.nodeType]) {\n return <>{children}>;\n }\n return renderNode[node.nodeType](node, children);\n }\n}\n", "import React, { ReactNode } from 'react';\n\nimport {\n Block,\n BLOCKS,\n Document,\n Inline,\n INLINES,\n MARKS,\n Text,\n helpers,\n} from '@contentful/rich-text-types';\n\nimport { nodeToReactComponent } from './util/nodeListToReactComponents';\n\nconst defaultNodeRenderers: RenderNode = {\n [BLOCKS.DOCUMENT]: (node, children) => children,\n [BLOCKS.PARAGRAPH]: (node, children) =>
{children}
,\n [BLOCKS.HEADING_1]: (node, children) =>{children},\n [BLOCKS.HR]: () =>
{text},\n [MARKS.SUPERSCRIPT]: (text) => {text},\n [MARKS.SUBSCRIPT]: (text) => {text},\n [MARKS.STRIKETHROUGH]: (text) =>