@genesislcap/design-system-configurator 14.427.0 → 14.428.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/106.106.873be83ea1662e3411a7.js +2 -0
  2. package/dist/{106.045b15677dc628bb6723746d03d4e4a5.js.map → 106.bd1ba43798c514478c765df2b0d505fd.js.map} +1 -1
  3. package/dist/{151.151.3a73020fcd54290212fb.js → 151.151.e71373c44ec540d2832b.js} +1 -1
  4. package/dist/{163.163.3c8c774024c0ace2023c.js → 163.163.a94a2be3697c7238ed7d.js} +1 -1
  5. package/dist/{182.182.f613b53c2583c18a862d.js → 182.182.abf8934d7a7aade75332.js} +3 -3
  6. package/dist/{210.210.38a437851eafab38113a.js → 210.210.a09201f35069dfc36bde.js} +2 -2
  7. package/dist/{3.3.32a559ea0ddf814313d0.js → 3.3.e55110961049fd78ae0d.js} +2 -2
  8. package/dist/{445.445.a60d68d6ddaf64154040.js → 445.445.80e79c0be34be0593629.js} +2 -2
  9. package/dist/{627.627.42f51bbaaa7a00dea39e.js → 627.627.23efb2008a124a336c56.js} +7 -7
  10. package/dist/627.9d3243203f0cc229aab314a84c14b038.js.map +1 -0
  11. package/dist/{72.72.6783be16024d80b1a1e3.js → 72.72.8b87d2a32012cdbf13db.js} +2 -2
  12. package/dist/{72.49c400624bd7ec5a251fa2882f16a4bc.js.map → 72.7d14f34f9845376625ca29332528219a.js.map} +1 -1
  13. package/dist/{designSystemConfigurator.b2f249228842a2438de0cd0399a65a6d.js.map → designSystemConfigurator.dcdeca6ed84a630c137d8a9912f7940c.js.map} +1 -1
  14. package/dist/index.html +1 -1
  15. package/dist/{main.e75a5623a4bf7f8e1a111f98f29c8f69.js.map → main.23e6e7bcf1c2827b68cf54110393ebc0.js.map} +1 -1
  16. package/dist/main.7e26675e18a68e23a5c3.js +2 -0
  17. package/dist/npm.jsonforms.283.154bc31fc60a0e7e38e5.js +2 -0
  18. package/dist/{npm.jsonforms.7e8eec0d982d8328c230880c2353d56a.js.map → npm.jsonforms.c3af23f4a259671bc86b40c50d1e8425.js.map} +1 -1
  19. package/dist/{npm.lodash.23.a5bdd23ca23b6cb64d3c.js → npm.lodash.23.ee8ccf6f4e94f6e26b60.js} +2 -2
  20. package/dist/{npm.lodash.c04538fa93419173d3281af04512a0c0.js.map → npm.lodash.d9d73ac66f5ee664382ecfc2dc8ce831.js.map} +1 -1
  21. package/dist/remoteEntry.js +2 -2
  22. package/package.json +13 -13
  23. package/dist/106.106.3f0bb43efd34b905efcb.js +0 -2
  24. package/dist/627.2646fad0f89529d7a50c80d87b6b249b.js.map +0 -1
  25. package/dist/main.7f473d9cda596b2b5778.js +0 -2
  26. package/dist/npm.jsonforms.283.8e1f09499c5ccfbc4f76.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"npm.jsonforms.283.xxxxxxxxxxxxxxxxxxxx.js","mappings":"+6BA0BA,MAAMA,EAAwB,uBACxBC,EAAsB,WAc5B,MAAMC,EACF,WAAAC,CAAYC,GACRC,KAAKD,WAAaA,EAClBC,KAAKC,aAAgBC,IACjB,MAAMC,EAAQH,KAAKI,WAAWF,GACxBG,EAAS,CACXC,KAAM,SACNF,WAAYD,EACZI,qBAAsBP,KAAKD,WAAWI,EAAhBH,CAAuBL,IAE3Ca,EAAWR,KAAKD,WAAWI,EAAhBH,CAAuBJ,GAIxC,OAHIY,EAASC,OAAS,IAClBJ,EAAOG,SAAWA,GAEfH,GAEXL,KAAKI,WAAcF,GAERQ,OAAOC,KAAKT,GAAMU,OAAO,CAACC,EAAKC,KAClCD,EAAIC,GAAYd,KAAKe,SAASb,EAAKY,IAC5BD,GAHQ,CAAC,GAMxBb,KAAKe,SAAYb,IACb,cAAeA,GACX,IAAK,SACD,MAAO,CAAEI,KAAM,UACnB,IAAK,UACD,MAAO,CAAEA,KAAM,WACnB,IAAK,SACD,OAAIU,OAAOC,UAAUf,GACV,CAAEI,KAAM,WAEZ,CAAEA,KAAM,U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Q,OAAE2D,EAAM,MAAEvG,KAAU7D,GAAU0b,GAAiC/K,EAAOuH,GAC9F9S,EAAiByE,GAAe3J,EAAQ,QAASF,EAAM2E,YACvDkP,EAAIW,KAAgB7D,GACpBkM,EAAc1I,GAAwBiD,GAAepR,EAAMZ,EAArBgS,CAAqCzG,GAAQgE,KAAqBhE,GAAQkD,OAAG3O,OAAWA,OAAWA,GACzI6E,EAAYK,GACbA,EAAO9J,OAAS,GAAKuc,EAAYvc,OAAS,EAAI,KAAO,IACtDuc,EACJ,MAAO,IACA7c,EACH6D,QACAmC,OACAS,WACAvG,OAAQkF,EACR0X,YAAa5c,EACbH,KAAMC,EAAMD,KAAOC,EAAMD,KAAKO,OAAS,EACvC8J,OAAQL,EACRgT,SAAU7c,EAAO6c,U","sources":["webpack://@genesislcap/design-system-configurator/../../../node_modules/@jsonforms/core/lib/jsonforms-core.esm.js"],"sourcesContent":["import isEmpty from 'lodash/isEmpty';\nimport startCase from 'lodash/startCase';\nimport keys from 'lodash/keys';\nimport range from 'lodash/range';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport find from 'lodash/find';\nimport isArray from 'lodash/isArray';\nimport includes from 'lodash/includes';\nimport Ajv from 'ajv';\nimport addFormats from 'ajv-formats';\nimport filter from 'lodash/filter';\nimport isEqual from 'lodash/isEqual';\nimport merge from 'lodash/merge';\nimport cloneDeep from 'lodash/cloneDeep';\nimport setFp from 'lodash/fp/set';\nimport unsetFp from 'lodash/fp/unset';\nimport isFunction from 'lodash/isFunction';\nimport maxBy from 'lodash/maxBy';\nimport remove from 'lodash/remove';\nimport endsWith from 'lodash/endsWith';\nimport last from 'lodash/last';\nimport reduce from 'lodash/reduce';\nimport toPairs from 'lodash/toPairs';\nimport isUndefined from 'lodash/isUndefined';\n\nconst ADDITIONAL_PROPERTIES = 'additionalProperties';\nconst REQUIRED_PROPERTIES = 'required';\nconst distinct = (properties, discriminator) => {\n const known = {};\n return properties.filter((item) => {\n const discriminatorValue = discriminator(item);\n if (Object.prototype.hasOwnProperty.call(known, discriminatorValue)) {\n return false;\n }\n else {\n known[discriminatorValue] = true;\n return true;\n }\n });\n};\nclass Gen {\n constructor(findOption) {\n this.findOption = findOption;\n this.schemaObject = (data) => {\n const props = this.properties(data);\n const schema = {\n type: 'object',\n properties: props,\n additionalProperties: this.findOption(props)(ADDITIONAL_PROPERTIES),\n };\n const required = this.findOption(props)(REQUIRED_PROPERTIES);\n if (required.length > 0) {\n schema.required = required;\n }\n return schema;\n };\n this.properties = (data) => {\n const emptyProps = {};\n return Object.keys(data).reduce((acc, propName) => {\n acc[propName] = this.property(data[propName]);\n return acc;\n }, emptyProps);\n };\n this.property = (data) => {\n switch (typeof data) {\n case 'string':\n return { type: 'string' };\n case 'boolean':\n return { type: 'boolean' };\n case 'number':\n if (Number.isInteger(data)) {\n return { type: 'integer' };\n }\n return { type: 'number' };\n case 'object':\n if (data == null) {\n return { type: 'null' };\n }\n return this.schemaObjectOrArray(data);\n default:\n return {};\n }\n };\n this.schemaObjectOrArray = (data) => {\n if (data instanceof Array) {\n return this.schemaArray(data);\n }\n else {\n return this.schemaObject(data);\n }\n };\n this.schemaArray = (data) => {\n if (data.length > 0) {\n const allProperties = data.map(this.property);\n const uniqueProperties = distinct(allProperties, (prop) => JSON.stringify(prop));\n if (uniqueProperties.length === 1) {\n return {\n type: 'array',\n items: uniqueProperties[0],\n };\n }\n else {\n return {\n type: 'array',\n items: {\n oneOf: uniqueProperties,\n },\n };\n }\n }\n else {\n return {\n type: 'array',\n items: {},\n };\n }\n };\n }\n}\nconst generateJsonSchema = (\ninstance, options = {}) => {\n const findOption = (props) => (optionName) => {\n switch (optionName) {\n case ADDITIONAL_PROPERTIES:\n if (Object.prototype.hasOwnProperty.call(options, ADDITIONAL_PROPERTIES)) {\n return options[ADDITIONAL_PROPERTIES];\n }\n return true;\n case REQUIRED_PROPERTIES:\n if (Object.prototype.hasOwnProperty.call(options, REQUIRED_PROPERTIES)) {\n return options[REQUIRED_PROPERTIES](props);\n }\n return Object.keys(props);\n default:\n return;\n }\n };\n const gen = new Gen(findOption);\n return gen.schemaObject(instance);\n};\n\nconst usedIds = new Set();\nconst makeId = (idBase, iteration) => iteration <= 1 ? idBase : idBase + iteration.toString();\nconst isUniqueId = (idBase, iteration) => {\n const newID = makeId(idBase, iteration);\n return !usedIds.has(newID);\n};\nconst createId = (proposedId) => {\n if (proposedId === undefined) {\n proposedId = 'undefined';\n }\n let tries = 0;\n while (!isUniqueId(proposedId, tries)) {\n tries++;\n }\n const newID = makeId(proposedId, tries);\n usedIds.add(newID);\n return newID;\n};\nconst removeId = (id) => usedIds.delete(id);\nconst clearAllIds = () => usedIds.clear();\n\nconst compose = (path1, path2) => {\n let p1 = path1;\n if (!isEmpty(path1) && !isEmpty(path2) && !path2.startsWith('[')) {\n p1 = path1 + '.';\n }\n if (isEmpty(p1)) {\n return path2;\n }\n else if (isEmpty(path2)) {\n return p1;\n }\n else {\n return `${p1}${path2}`;\n }\n};\nconst toDataPathSegments = (schemaPath) => {\n const s = schemaPath\n .replace(/(anyOf|allOf|oneOf)\\/[\\d]+\\//g, '')\n .replace(/(then|else)\\//g, '');\n const segments = s.split('/');\n const decodedSegments = segments.map(decode);\n const startFromRoot = decodedSegments[0] === '#' || decodedSegments[0] === '';\n const startIndex = startFromRoot ? 2 : 1;\n return range(startIndex, decodedSegments.length, 2).map((idx) => decodedSegments[idx]);\n};\nconst toDataPath = (schemaPath) => {\n return toDataPathSegments(schemaPath).join('.');\n};\nconst encode = (segment) => segment?.replace(/~/g, '~0').replace(/\\//g, '~1');\nconst decode = (pointerSegment) => pointerSegment?.replace(/~1/g, '/').replace(/~0/, '~');\nconst getPropPath = (path) => {\n return `/properties/${path\n .split('.')\n .map((p) => encode(p))\n .join('/properties/')}`;\n};\n\nconst deriveLabel = (controlElement, schemaElement) => {\n if (schemaElement && typeof schemaElement.title === 'string') {\n return schemaElement.title;\n }\n if (typeof controlElement.scope === 'string') {\n const ref = controlElement.scope;\n const label = decode(ref.substr(ref.lastIndexOf('/') + 1));\n return startCase(label);\n }\n return '';\n};\nconst createCleanLabel = (label) => {\n return startCase(label.replace('_', ' '));\n};\nconst createLabelDescriptionFrom = (withLabel, schema) => {\n const labelProperty = withLabel.label;\n if (typeof labelProperty === 'boolean') {\n return labelDescription(deriveLabel(withLabel, schema), labelProperty);\n }\n if (typeof labelProperty === 'string') {\n return labelDescription(labelProperty, true);\n }\n if (typeof labelProperty === 'object') {\n const label = typeof labelProperty.text === 'string'\n ? labelProperty.text\n : deriveLabel(withLabel, schema);\n const show = typeof labelProperty.show === 'boolean' ? labelProperty.show : true;\n return labelDescription(label, show);\n }\n return labelDescription(deriveLabel(withLabel, schema), true);\n};\nconst labelDescription = (text, show) => ({\n text: text,\n show: show,\n});\n\nconst isObjectSchema$1 = (schema) => {\n return schema.properties !== undefined;\n};\nconst isArraySchema = (schema) => {\n return schema.type === 'array' && schema.items !== undefined;\n};\nconst resolveData = (instance, dataPath) => {\n if (isEmpty(dataPath)) {\n return instance;\n }\n const dataPathSegments = dataPath.split('.');\n return dataPathSegments.reduce((curInstance, decodedSegment) => {\n if (!curInstance ||\n !Object.prototype.hasOwnProperty.call(curInstance, decodedSegment)) {\n return undefined;\n }\n return curInstance[decodedSegment];\n }, instance);\n};\nconst findAllRefs = (schema, result = {}, resolveTuples = false) => {\n if (isObjectSchema$1(schema)) {\n Object.keys(schema.properties).forEach((key) => findAllRefs(schema.properties[key], result));\n }\n if (isArraySchema(schema)) {\n if (Array.isArray(schema.items)) {\n if (resolveTuples) {\n const items = schema.items;\n items.forEach((child) => findAllRefs(child, result));\n }\n }\n else {\n findAllRefs(schema.items, result);\n }\n }\n if (Array.isArray(schema.anyOf)) {\n const anyOf = schema.anyOf;\n anyOf.forEach((child) => findAllRefs(child, result));\n }\n if (schema.$ref !== undefined) {\n result[schema.$ref] = schema;\n }\n return result;\n};\nconst invalidSegment = (pathSegment) => pathSegment === '#' || pathSegment === undefined || pathSegment === '';\nconst resolveSchema = (schema, schemaPath, rootSchema) => {\n const segments = schemaPath?.split('/').map(decode);\n return resolveSchemaWithSegments(schema, segments, rootSchema);\n};\nconst resolveSchemaWithSegments = (schema, pathSegments, rootSchema) => {\n if (typeof schema?.$ref === 'string') {\n schema = resolveSchema(rootSchema, schema.$ref, rootSchema);\n }\n if (!pathSegments || pathSegments.length === 0) {\n return schema;\n }\n if (isEmpty(schema)) {\n return undefined;\n }\n const [segment, ...remainingSegments] = pathSegments;\n if (invalidSegment(segment)) {\n return resolveSchemaWithSegments(schema, remainingSegments, rootSchema);\n }\n const singleSegmentResolveSchema = get(schema, segment);\n const resolvedSchema = resolveSchemaWithSegments(singleSegmentResolveSchema, remainingSegments, rootSchema);\n if (resolvedSchema) {\n return resolvedSchema;\n }\n if (segment === 'properties' || segment === 'items') {\n let alternativeResolveResult = undefined;\n const subSchemas = [].concat(schema.oneOf ?? [], schema.allOf ?? [], schema.anyOf ?? [], schema.then ?? [], schema.else ?? []);\n for (const subSchema of subSchemas) {\n alternativeResolveResult = resolveSchemaWithSegments(subSchema, [segment, ...remainingSegments], rootSchema);\n if (alternativeResolveResult) {\n break;\n }\n }\n return alternativeResolveResult;\n }\n return undefined;\n};\n\nconst Draft4 = {\n id: 'http://json-schema.org/draft-04/schema#',\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n positiveInteger: {\n type: 'integer',\n minimum: 0,\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/positiveInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: [\n 'array',\n 'boolean',\n 'integer',\n 'null',\n 'number',\n 'object',\n 'string',\n ],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n uniqueItems: true,\n },\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n format: 'uri',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: {},\n multipleOf: {\n type: 'number',\n minimum: 0,\n exclusiveMinimum: true,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'boolean',\n default: false,\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'boolean',\n default: false,\n },\n maxLength: { $ref: '#/definitions/positiveInteger' },\n minLength: { $ref: '#/definitions/positiveIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: {\n anyOf: [{ type: 'boolean' }, { $ref: '#' }],\n default: {},\n },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: {},\n },\n maxItems: { $ref: '#/definitions/positiveInteger' },\n minItems: { $ref: '#/definitions/positiveIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n maxProperties: { $ref: '#/definitions/positiveInteger' },\n minProperties: { $ref: '#/definitions/positiveIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: {\n anyOf: [{ type: 'boolean' }, { $ref: '#' }],\n default: {},\n },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n enum: {\n type: 'array',\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n dependencies: {\n exclusiveMaximum: ['maximum'],\n exclusiveMinimum: ['minimum'],\n },\n default: {},\n};\n\nvar RuleEffect;\n(function (RuleEffect) {\n RuleEffect[\"HIDE\"] = \"HIDE\";\n RuleEffect[\"SHOW\"] = \"SHOW\";\n RuleEffect[\"ENABLE\"] = \"ENABLE\";\n RuleEffect[\"DISABLE\"] = \"DISABLE\";\n})(RuleEffect || (RuleEffect = {}));\n\nconst setReadonlyPropertyValue = (value) => (child) => {\n if (!child.options) {\n child.options = {};\n }\n child.options.readonly = value;\n};\nconst setReadonly = (uischema) => {\n iterateSchema(uischema, setReadonlyPropertyValue(true));\n};\nconst unsetReadonly = (uischema) => {\n iterateSchema(uischema, setReadonlyPropertyValue(false));\n};\nconst iterateSchema = (uischema, toApply) => {\n if (isEmpty(uischema)) {\n return;\n }\n if (isLayout(uischema)) {\n uischema.elements.forEach((child) => iterateSchema(child, toApply));\n return;\n }\n toApply(uischema);\n};\nconst findUiControl = (uiSchema, path) => {\n if (isControlElement(uiSchema)) {\n if (isScoped(uiSchema) && uiSchema.scope.endsWith(getPropPath(path))) {\n return uiSchema;\n }\n else if (uiSchema.options?.detail) {\n return findUiControl(uiSchema.options.detail, path);\n }\n }\n if (isLayout(uiSchema)) {\n for (const elem of uiSchema.elements) {\n const result = findUiControl(elem, path);\n if (result !== undefined)\n return result;\n }\n }\n return undefined;\n};\nconst composeWithUi = (scopableUi, path) => {\n if (!isScoped(scopableUi)) {\n return path ?? '';\n }\n const segments = toDataPathSegments(scopableUi.scope);\n if (isEmpty(segments)) {\n return path ?? '';\n }\n return compose(path, segments.join('.'));\n};\nconst isInternationalized = (element) => typeof element === 'object' &&\n element !== null &&\n typeof element.i18n === 'string';\nconst isGroup = (layout) => layout.type === 'Group';\nconst isLayout = (uischema) => uischema.elements !== undefined;\nconst isScopable = (obj) => !!obj && typeof obj === 'object';\nconst isScoped = (obj) => isScopable(obj) && typeof obj.scope === 'string';\nconst isLabelable = (obj) => !!obj && typeof obj === 'object';\nconst isLabeled = (obj) => isLabelable(obj) && ['string', 'boolean'].includes(typeof obj.label);\nconst isControlElement = (uiSchema) => uiSchema.type === 'Control';\n\nconst isOrCondition = (condition) => condition.type === 'OR';\nconst isAndCondition = (condition) => condition.type === 'AND';\nconst isLeafCondition = (condition) => condition.type === 'LEAF';\nconst isSchemaCondition = (condition) => has(condition, 'schema');\nconst isValidateFunctionCondition = (condition) => has(condition, 'validate') &&\n typeof condition.validate === 'function';\nconst getConditionScope = (condition, path) => {\n return composeWithUi(condition, path);\n};\nconst evaluateCondition = (data, uischema, condition, path, ajv) => {\n if (isAndCondition(condition)) {\n return condition.conditions.reduce((acc, cur) => acc && evaluateCondition(data, uischema, cur, path, ajv), true);\n }\n else if (isOrCondition(condition)) {\n return condition.conditions.reduce((acc, cur) => acc || evaluateCondition(data, uischema, cur, path, ajv), false);\n }\n else if (isLeafCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n return value === condition.expectedValue;\n }\n else if (isSchemaCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n if (condition.failWhenUndefined && value === undefined) {\n return false;\n }\n return ajv.validate(condition.schema, value);\n }\n else if (isValidateFunctionCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n const context = {\n data: value,\n fullData: data,\n path,\n uischemaElement: uischema,\n };\n return condition.validate(context);\n }\n else {\n return true;\n }\n};\nconst isRuleFulfilled = (uischema, data, path, ajv) => {\n const condition = uischema.rule.condition;\n return evaluateCondition(data, uischema, condition, path, ajv);\n};\nconst evalVisibility = (uischema, data, path = undefined, ajv) => {\n const fulfilled = isRuleFulfilled(uischema, data, path, ajv);\n switch (uischema.rule.effect) {\n case RuleEffect.HIDE:\n return !fulfilled;\n case RuleEffect.SHOW:\n return fulfilled;\n default:\n return true;\n }\n};\nconst evalEnablement = (uischema, data, path = undefined, ajv) => {\n const fulfilled = isRuleFulfilled(uischema, data, path, ajv);\n switch (uischema.rule.effect) {\n case RuleEffect.DISABLE:\n return !fulfilled;\n case RuleEffect.ENABLE:\n return fulfilled;\n default:\n return true;\n }\n};\nconst hasShowRule = (uischema) => {\n if (uischema.rule &&\n (uischema.rule.effect === RuleEffect.SHOW ||\n uischema.rule.effect === RuleEffect.HIDE)) {\n return true;\n }\n return false;\n};\nconst hasEnableRule = (uischema) => {\n if (uischema.rule &&\n (uischema.rule.effect === RuleEffect.ENABLE ||\n uischema.rule.effect === RuleEffect.DISABLE)) {\n return true;\n }\n return false;\n};\nconst isVisible = (uischema, data, path = undefined, ajv) => {\n if (uischema.rule) {\n return evalVisibility(uischema, data, path, ajv);\n }\n return true;\n};\nconst isEnabled = (uischema, data, path = undefined, ajv) => {\n if (uischema.rule) {\n return evalEnablement(uischema, data, path, ajv);\n }\n return true;\n};\n\nconst getFirstPrimitiveProp = (schema) => {\n if (schema &&\n typeof schema === 'object' &&\n 'properties' in schema &&\n schema.properties) {\n return find(Object.keys(schema.properties), (propName) => {\n const prop = schema.properties[propName];\n return (prop &&\n typeof prop === 'object' &&\n 'type' in prop &&\n (prop.type === 'string' ||\n prop.type === 'number' ||\n prop.type === 'integer'));\n });\n }\n return undefined;\n};\nconst isOneOfEnumSchema = (schema) => !!schema &&\n Object.prototype.hasOwnProperty.call(schema, 'oneOf') &&\n schema.oneOf &&\n schema.oneOf.every((s) => s.const !== undefined);\nconst isEnumSchema = (schema) => !!schema &&\n typeof schema === 'object' &&\n (Object.prototype.hasOwnProperty.call(schema, 'enum') ||\n Object.prototype.hasOwnProperty.call(schema, 'const'));\n\nconst convertDateToString = (date, format) => {\n const dateString = date.toISOString();\n if (format === 'date-time') {\n return dateString;\n }\n else if (format === 'date') {\n return dateString.split('T')[0];\n }\n else if (format === 'time') {\n return dateString.split('T')[1].split('.')[0];\n }\n return dateString;\n};\nconst convertToValidClassName = (s) => s.replace('#', 'root').replace(new RegExp('/', 'g'), '_');\nconst hasType = (jsonSchema, expected) => {\n return includes(deriveTypes(jsonSchema), expected);\n};\nconst deriveTypes = (jsonSchema) => {\n if (isEmpty(jsonSchema)) {\n return [];\n }\n if (!isEmpty(jsonSchema.type) && typeof jsonSchema.type === 'string') {\n return [jsonSchema.type];\n }\n if (isArray(jsonSchema.type)) {\n return jsonSchema.type;\n }\n if (!isEmpty(jsonSchema.properties) ||\n !isEmpty(jsonSchema.additionalProperties)) {\n return ['object'];\n }\n if (!isEmpty(jsonSchema.items)) {\n return ['array'];\n }\n if (!isEmpty(jsonSchema.enum)) {\n const types = new Set();\n jsonSchema.enum.forEach((enumElement) => {\n if (typeof enumElement === 'string') {\n types.add('string');\n }\n else {\n deriveTypes(enumElement).forEach((type) => types.add(type));\n }\n });\n return Array.from(types);\n }\n if (!isEmpty(jsonSchema.allOf)) {\n const allOfType = find(jsonSchema.allOf, (schema) => deriveTypes(schema).length !== 0);\n if (allOfType) {\n return deriveTypes(allOfType);\n }\n }\n return [];\n};\nconst Resolve = {\n schema: resolveSchema,\n data: resolveData,\n};\nconst fromScoped = (scopable) => toDataPathSegments(scopable.scope).join('.');\nconst Paths = {\n compose: compose,\n fromScoped,\n};\nconst Runtime = {\n isEnabled(uischema, data, ajv) {\n return isEnabled(uischema, data, undefined, ajv);\n },\n isVisible(uischema, data, ajv) {\n return isVisible(uischema, data, undefined, ajv);\n },\n};\n\nconst createAjv = (options) => {\n const ajv = new Ajv({\n allErrors: true,\n verbose: true,\n strict: false,\n addUsedSchema: false,\n ...options,\n });\n addFormats(ajv);\n return ajv;\n};\nconst validate = (validator, data) => {\n if (validator === undefined) {\n return [];\n }\n const valid = validator(data);\n if (valid) {\n return [];\n }\n return validator.errors;\n};\n\nconst defaultDateFormat = 'YYYY-MM-DD';\nconst defaultTimeFormat = 'HH:mm:ss';\nconst defaultDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss.sssZ';\n\nconst getInvalidProperty = (error) => {\n switch (error.keyword) {\n case 'required':\n case 'dependencies':\n return error.params.missingProperty;\n case 'additionalProperties':\n return error.params.additionalProperty;\n default:\n return undefined;\n }\n};\nconst getControlPath = (error) => {\n let controlPath = error.dataPath || error.instancePath || '';\n controlPath = controlPath.replace(/\\//g, '.');\n const invalidProperty = getInvalidProperty(error);\n if (invalidProperty !== undefined && !controlPath.endsWith(invalidProperty)) {\n controlPath = `${controlPath}.${invalidProperty}`;\n }\n controlPath = controlPath.replace(/^./, '');\n controlPath = decode(controlPath);\n return controlPath;\n};\nconst errorsAt = (instancePath, schema, matchPath) => (errors) => {\n const combinatorPaths = filter(errors, (error) => error.keyword === 'oneOf' || error.keyword === 'anyOf').map((error) => getControlPath(error));\n return filter(errors, (error) => {\n if (filteredErrorKeywords.indexOf(error.keyword) !== -1 &&\n !isOneOfEnumSchema(error.parentSchema)) {\n return false;\n }\n const controlPath = getControlPath(error);\n let result = matchPath(controlPath);\n const parentSchema = error.parentSchema;\n if (result &&\n !isObjectSchema(parentSchema) &&\n !isOneOfEnumSchema(parentSchema) &&\n combinatorPaths.findIndex((p) => instancePath.startsWith(p)) !== -1) {\n result = result && isEqual(parentSchema, schema);\n }\n return result;\n });\n};\nconst isObjectSchema = (schema) => {\n return schema?.type === 'object' || !!schema?.properties;\n};\nconst filteredErrorKeywords = [\n 'additionalProperties',\n 'allOf',\n 'anyOf',\n 'oneOf',\n];\nconst formatErrorMessage = (errors) => {\n if (errors === undefined || errors === null) {\n return '';\n }\n return errors.join('\\n');\n};\n\nconst Helpers = {\n createLabelDescriptionFrom,\n convertToValidClassName,\n};\n\nconst createLayout = (layoutType) => ({\n type: layoutType,\n elements: [],\n});\nconst createControlElement = (ref) => ({\n type: 'Control',\n scope: ref,\n});\nconst wrapInLayoutIfNecessary = (uischema, layoutType) => {\n if (!isEmpty(uischema) && !isLayout(uischema)) {\n const verticalLayout = createLayout(layoutType);\n verticalLayout.elements.push(uischema);\n return verticalLayout;\n }\n return uischema;\n};\nconst addLabel = (layout, labelName) => {\n if (!isEmpty(labelName)) {\n const fixedLabel = startCase(labelName);\n if (isGroup(layout)) {\n layout.label = fixedLabel;\n }\n else {\n const label = {\n type: 'Label',\n text: fixedLabel,\n };\n layout.elements.push(label);\n }\n }\n};\nconst isCombinator = (jsonSchema) => {\n return (!isEmpty(jsonSchema) &&\n (!isEmpty(jsonSchema.oneOf) ||\n !isEmpty(jsonSchema.anyOf) ||\n !isEmpty(jsonSchema.allOf)));\n};\nconst generateUISchema = (jsonSchema, schemaElements, currentRef, schemaName, layoutType, rootSchema) => {\n if (!isEmpty(jsonSchema) && jsonSchema.$ref !== undefined) {\n return generateUISchema(resolveSchema(rootSchema, jsonSchema.$ref, rootSchema), schemaElements, currentRef, schemaName, layoutType, rootSchema);\n }\n if (isCombinator(jsonSchema)) {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n const types = deriveTypes(jsonSchema);\n if (types.length === 0) {\n return null;\n }\n if (types.length > 1) {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n if (currentRef === '#' && types[0] === 'object') {\n const layout = createLayout(layoutType);\n schemaElements.push(layout);\n if (jsonSchema.properties && keys(jsonSchema.properties).length > 1) {\n addLabel(layout, schemaName);\n }\n if (!isEmpty(jsonSchema.properties)) {\n const nextRef = currentRef + '/properties';\n Object.keys(jsonSchema.properties).map((propName) => {\n let value = jsonSchema.properties[propName];\n const ref = `${nextRef}/${encode(propName)}`;\n if (value.$ref !== undefined) {\n value = resolveSchema(rootSchema, value.$ref, rootSchema);\n }\n generateUISchema(value, layout.elements, ref, propName, layoutType, rootSchema);\n });\n }\n return layout;\n }\n switch (types[0]) {\n case 'object':\n case 'array':\n case 'string':\n case 'number':\n case 'integer':\n case 'null':\n case 'boolean': {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n default:\n throw new Error('Unknown type: ' + JSON.stringify(jsonSchema));\n }\n};\nconst generateDefaultUISchema = (jsonSchema, layoutType = 'VerticalLayout', prefix = '#', rootSchema = jsonSchema) => wrapInLayoutIfNecessary(generateUISchema(jsonSchema, [], prefix, '', layoutType, rootSchema), layoutType);\n\nconst Generate = {\n jsonSchema: generateJsonSchema,\n uiSchema: generateDefaultUISchema,\n controlElement: createControlElement,\n};\n\nconst INIT = 'jsonforms/INIT';\nconst UPDATE_CORE = 'jsonforms/UPDATE_CORE';\nconst SET_AJV = 'jsonforms/SET_AJV';\nconst UPDATE_DATA = 'jsonforms/UPDATE';\nconst UPDATE_ERRORS = 'jsonforms/UPDATE_ERRORS';\nconst VALIDATE = 'jsonforms/VALIDATE';\nconst ADD_RENDERER = 'jsonforms/ADD_RENDERER';\nconst REMOVE_RENDERER = 'jsonforms/REMOVE_RENDERER';\nconst ADD_CELL = 'jsonforms/ADD_CELL';\nconst REMOVE_CELL = 'jsonforms/REMOVE_CELL';\nconst SET_CONFIG = 'jsonforms/SET_CONFIG';\nconst ADD_UI_SCHEMA = 'jsonforms/ADD_UI_SCHEMA';\nconst REMOVE_UI_SCHEMA = 'jsonforms/REMOVE_UI_SCHEMA';\nconst SET_SCHEMA = 'jsonforms/SET_SCHEMA';\nconst SET_UISCHEMA = 'jsonforms/SET_UISCHEMA';\nconst SET_VALIDATION_MODE = 'jsonforms/SET_VALIDATION_MODE';\nconst SET_LOCALE = 'jsonforms/SET_LOCALE';\nconst SET_TRANSLATOR = 'jsonforms/SET_TRANSLATOR';\nconst UPDATE_I18N = 'jsonforms/UPDATE_I18N';\nconst ADD_DEFAULT_DATA = 'jsonforms/ADD_DEFAULT_DATA';\nconst REMOVE_DEFAULT_DATA = 'jsonforms/REMOVE_DEFAULT_DATA';\nconst isUpdateArrayContext = (context) => {\n if (!('type' in context)) {\n return false;\n }\n if (typeof context.type !== 'string') {\n return false;\n }\n switch (context.type) {\n case 'ADD': {\n return ('values' in context &&\n Array.isArray(context.values) &&\n context.values.length > 0);\n }\n case 'REMOVE': {\n return ('indices' in context &&\n Array.isArray(context.indices) &&\n context.indices.length > 0 &&\n context.indices.every((i) => typeof i === 'number'));\n }\n case 'MOVE': {\n return ('moves' in context &&\n Array.isArray(context.moves) &&\n context.moves.length > 0 &&\n context.moves.every((m) => typeof m === 'object' &&\n m !== null &&\n 'from' in m &&\n 'to' in m &&\n typeof m.from === 'number' &&\n typeof m.to === 'number'));\n }\n default:\n return false;\n }\n};\nconst init = (data, schema = generateJsonSchema(data), uischema, options) => ({\n type: INIT,\n data,\n schema,\n uischema: typeof uischema === 'object' ? uischema : generateDefaultUISchema(schema),\n options,\n});\nconst updateCore = (data, schema, uischema, options) => ({\n type: UPDATE_CORE,\n data,\n schema,\n uischema,\n options,\n});\nconst registerDefaultData = (schemaPath, data) => ({\n type: ADD_DEFAULT_DATA,\n schemaPath,\n data,\n});\nconst unregisterDefaultData = (schemaPath) => ({\n type: REMOVE_DEFAULT_DATA,\n schemaPath,\n});\nconst setAjv = (ajv) => ({\n type: SET_AJV,\n ajv,\n});\nconst update = (path, updater, context) => ({\n type: UPDATE_DATA,\n path,\n updater,\n context,\n});\nconst updateErrors = (errors) => ({\n type: UPDATE_ERRORS,\n errors,\n});\nconst registerRenderer = (tester, renderer) => ({\n type: ADD_RENDERER,\n tester,\n renderer,\n});\nconst registerCell = (tester, cell) => ({\n type: ADD_CELL,\n tester,\n cell,\n});\nconst unregisterCell = (tester, cell) => ({\n type: REMOVE_CELL,\n tester,\n cell,\n});\nconst unregisterRenderer = (tester, renderer) => ({\n type: REMOVE_RENDERER,\n tester,\n renderer,\n});\nconst setConfig = (config) => ({\n type: SET_CONFIG,\n config,\n});\nconst setValidationMode = (validationMode) => ({\n type: SET_VALIDATION_MODE,\n validationMode,\n});\nconst registerUISchema = (tester, uischema) => {\n return {\n type: ADD_UI_SCHEMA,\n tester,\n uischema,\n };\n};\nconst unregisterUISchema = (tester) => {\n return {\n type: REMOVE_UI_SCHEMA,\n tester,\n };\n};\nconst setLocale = (locale) => ({\n type: SET_LOCALE,\n locale,\n});\nconst setSchema = (schema) => ({\n type: SET_SCHEMA,\n schema,\n});\nconst setTranslator = (translator, errorTranslator) => ({\n type: SET_TRANSLATOR,\n translator,\n errorTranslator,\n});\nconst updateI18n = (locale, translator, errorTranslator) => ({\n type: UPDATE_I18N,\n locale,\n translator,\n errorTranslator,\n});\nconst setUISchema = (uischema) => ({\n type: SET_UISCHEMA,\n uischema,\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n INIT: INIT,\n UPDATE_CORE: UPDATE_CORE,\n SET_AJV: SET_AJV,\n UPDATE_DATA: UPDATE_DATA,\n UPDATE_ERRORS: UPDATE_ERRORS,\n VALIDATE: VALIDATE,\n ADD_RENDERER: ADD_RENDERER,\n REMOVE_RENDERER: REMOVE_RENDERER,\n ADD_CELL: ADD_CELL,\n REMOVE_CELL: REMOVE_CELL,\n SET_CONFIG: SET_CONFIG,\n ADD_UI_SCHEMA: ADD_UI_SCHEMA,\n REMOVE_UI_SCHEMA: REMOVE_UI_SCHEMA,\n SET_SCHEMA: SET_SCHEMA,\n SET_UISCHEMA: SET_UISCHEMA,\n SET_VALIDATION_MODE: SET_VALIDATION_MODE,\n SET_LOCALE: SET_LOCALE,\n SET_TRANSLATOR: SET_TRANSLATOR,\n UPDATE_I18N: UPDATE_I18N,\n ADD_DEFAULT_DATA: ADD_DEFAULT_DATA,\n REMOVE_DEFAULT_DATA: REMOVE_DEFAULT_DATA,\n isUpdateArrayContext: isUpdateArrayContext,\n init: init,\n updateCore: updateCore,\n registerDefaultData: registerDefaultData,\n unregisterDefaultData: unregisterDefaultData,\n setAjv: setAjv,\n update: update,\n updateErrors: updateErrors,\n registerRenderer: registerRenderer,\n registerCell: registerCell,\n unregisterCell: unregisterCell,\n unregisterRenderer: unregisterRenderer,\n setConfig: setConfig,\n setValidationMode: setValidationMode,\n registerUISchema: registerUISchema,\n unregisterUISchema: unregisterUISchema,\n setLocale: setLocale,\n setSchema: setSchema,\n setTranslator: setTranslator,\n updateI18n: updateI18n,\n setUISchema: setUISchema\n});\n\nconst cellReducer = (state = [], { type, tester, cell }) => {\n switch (type) {\n case ADD_CELL:\n return state.concat([{ tester, cell }]);\n case REMOVE_CELL:\n return state.filter((t) => t.tester !== tester);\n default:\n return state;\n }\n};\n\nconst configDefault = {\n restrict: false,\n trim: false,\n showUnfocusedDescription: false,\n hideRequiredAsterisk: false,\n};\n\nconst applyDefaultConfiguration = (config = {}) => merge({}, configDefault, config);\nconst configReducer = (state = applyDefaultConfiguration(), action) => {\n switch (action.type) {\n case SET_CONFIG:\n return applyDefaultConfiguration(action.config);\n default:\n return state;\n }\n};\n\nconst initState = {\n data: {},\n schema: {},\n uischema: undefined,\n errors: [],\n validator: undefined,\n ajv: undefined,\n validationMode: 'ValidateAndShow',\n additionalErrors: [],\n};\nconst getValidationMode = (state, action) => {\n if (action && hasValidationModeOption(action.options)) {\n return action.options.validationMode;\n }\n return state.validationMode;\n};\nconst hasValidationModeOption = (option) => {\n if (option) {\n return option.validationMode !== undefined;\n }\n return false;\n};\nconst hasAdditionalErrorsOption = (option) => {\n if (option) {\n return option.additionalErrors !== undefined;\n }\n return false;\n};\nconst getAdditionalErrors = (state, action) => {\n if (action && hasAdditionalErrorsOption(action.options)) {\n return action.options.additionalErrors;\n }\n return state.additionalErrors;\n};\nconst getOrCreateAjv = (state, action) => {\n if (action) {\n if (hasAjvOption(action.options)) {\n return action.options.ajv;\n }\n else if (action.options !== undefined) {\n if (isFunction(action.options.compile)) {\n return action.options;\n }\n }\n }\n return state.ajv ? state.ajv : createAjv();\n};\nconst hasAjvOption = (option) => {\n if (option) {\n return option.ajv !== undefined;\n }\n return false;\n};\nconst coreReducer = (state = initState, action) => {\n switch (action.type) {\n case INIT: {\n const thisAjv = getOrCreateAjv(state, action);\n const validationMode = getValidationMode(state, action);\n const v = validationMode === 'NoValidation'\n ? undefined\n : thisAjv.compile(action.schema);\n const e = validate(v, action.data);\n const additionalErrors = getAdditionalErrors(state, action);\n return {\n ...state,\n data: action.data,\n schema: action.schema,\n uischema: action.uischema,\n additionalErrors,\n errors: e,\n validator: v,\n ajv: thisAjv,\n validationMode,\n };\n }\n case UPDATE_CORE: {\n const thisAjv = getOrCreateAjv(state, action);\n const validationMode = getValidationMode(state, action);\n let validator = state.validator;\n let errors = state.errors;\n if (state.schema !== action.schema ||\n state.validationMode !== validationMode ||\n state.ajv !== thisAjv) {\n validator =\n validationMode === 'NoValidation'\n ? undefined\n : thisAjv.compile(action.schema);\n errors = validate(validator, action.data);\n }\n else if (state.data !== action.data) {\n errors = validate(validator, action.data);\n }\n const additionalErrors = getAdditionalErrors(state, action);\n const stateChanged = state.data !== action.data ||\n state.schema !== action.schema ||\n state.uischema !== action.uischema ||\n state.ajv !== thisAjv ||\n state.errors !== errors ||\n state.validator !== validator ||\n state.validationMode !== validationMode ||\n state.additionalErrors !== additionalErrors;\n return stateChanged\n ? {\n ...state,\n data: action.data,\n schema: action.schema,\n uischema: action.uischema,\n ajv: thisAjv,\n errors: isEqual(errors, state.errors) ? state.errors : errors,\n validator: validator,\n validationMode: validationMode,\n additionalErrors,\n }\n : state;\n }\n case SET_AJV: {\n const currentAjv = action.ajv;\n const validator = state.validationMode === 'NoValidation'\n ? undefined\n : currentAjv.compile(state.schema);\n const errors = validate(validator, state.data);\n return {\n ...state,\n validator,\n errors,\n };\n }\n case SET_SCHEMA: {\n const needsNewValidator = action.schema && state.ajv && state.validationMode !== 'NoValidation';\n const v = needsNewValidator\n ? state.ajv.compile(action.schema)\n : state.validator;\n const errors = validate(v, state.data);\n return {\n ...state,\n validator: v,\n schema: action.schema,\n errors,\n };\n }\n case SET_UISCHEMA: {\n return {\n ...state,\n uischema: action.uischema,\n };\n }\n case UPDATE_DATA: {\n if (action.path === undefined || action.path === null) {\n return state;\n }\n else if (action.path === '') {\n const result = action.updater(cloneDeep(state.data));\n const errors = validate(state.validator, result);\n return {\n ...state,\n data: result,\n errors,\n };\n }\n else {\n const oldData = get(state.data, action.path);\n const newData = action.updater(cloneDeep(oldData));\n let newState;\n if (newData !== undefined) {\n newState = setFp(action.path, newData, state.data === undefined ? {} : state.data);\n }\n else {\n newState = unsetFp(action.path, state.data === undefined ? {} : state.data);\n }\n const errors = validate(state.validator, newState);\n return {\n ...state,\n data: newState,\n errors,\n };\n }\n }\n case UPDATE_ERRORS: {\n return {\n ...state,\n errors: action.errors,\n };\n }\n case SET_VALIDATION_MODE: {\n if (state.validationMode === action.validationMode) {\n return state;\n }\n if (action.validationMode === 'NoValidation') {\n const errors = validate(undefined, state.data);\n return {\n ...state,\n errors,\n validationMode: action.validationMode,\n };\n }\n if (state.validationMode === 'NoValidation') {\n const validator = state.ajv.compile(state.schema);\n const errors = validate(validator, state.data);\n return {\n ...state,\n validator,\n errors,\n validationMode: action.validationMode,\n };\n }\n return {\n ...state,\n validationMode: action.validationMode,\n };\n }\n default:\n return state;\n }\n};\n\nconst defaultDataReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_DEFAULT_DATA:\n return state.concat([\n { schemaPath: action.schemaPath, data: action.data },\n ]);\n case REMOVE_DEFAULT_DATA:\n return state.filter((t) => t.schemaPath !== action.schemaPath);\n default:\n return state;\n }\n};\nconst getDefaultData = (state) => extractDefaultData(get(state, 'jsonforms.defaultData'));\nconst extractDefaultData = (state) => state;\n\nvar ArrayTranslationEnum;\n(function (ArrayTranslationEnum) {\n ArrayTranslationEnum[\"addTooltip\"] = \"addTooltip\";\n ArrayTranslationEnum[\"addAriaLabel\"] = \"addAriaLabel\";\n ArrayTranslationEnum[\"removeTooltip\"] = \"removeTooltip\";\n ArrayTranslationEnum[\"upAriaLabel\"] = \"upAriaLabel\";\n ArrayTranslationEnum[\"downAriaLabel\"] = \"downAriaLabel\";\n ArrayTranslationEnum[\"noSelection\"] = \"noSelection\";\n ArrayTranslationEnum[\"removeAriaLabel\"] = \"removeAriaLabel\";\n ArrayTranslationEnum[\"noDataMessage\"] = \"noDataMessage\";\n ArrayTranslationEnum[\"deleteDialogTitle\"] = \"deleteDialogTitle\";\n ArrayTranslationEnum[\"deleteDialogMessage\"] = \"deleteDialogMessage\";\n ArrayTranslationEnum[\"deleteDialogAccept\"] = \"deleteDialogAccept\";\n ArrayTranslationEnum[\"deleteDialogDecline\"] = \"deleteDialogDecline\";\n ArrayTranslationEnum[\"up\"] = \"up\";\n ArrayTranslationEnum[\"down\"] = \"down\";\n})(ArrayTranslationEnum || (ArrayTranslationEnum = {}));\nconst arrayDefaultTranslations = [\n {\n key: ArrayTranslationEnum.addTooltip,\n default: (input) => (input ? `Add to ${input}` : 'Add'),\n },\n {\n key: ArrayTranslationEnum.addAriaLabel,\n default: (input) => (input ? `Add to ${input} button` : 'Add button'),\n },\n { key: ArrayTranslationEnum.removeTooltip, default: () => 'Delete' },\n { key: ArrayTranslationEnum.removeAriaLabel, default: () => 'Delete button' },\n { key: ArrayTranslationEnum.upAriaLabel, default: () => `Move item up` },\n { key: ArrayTranslationEnum.up, default: () => 'Up' },\n { key: ArrayTranslationEnum.down, default: () => 'Down' },\n { key: ArrayTranslationEnum.downAriaLabel, default: () => `Move item down` },\n { key: ArrayTranslationEnum.noDataMessage, default: () => 'No data' },\n { key: ArrayTranslationEnum.noSelection, default: () => 'No selection' },\n {\n key: ArrayTranslationEnum.deleteDialogTitle,\n default: () => 'Confirm Deletion',\n },\n {\n key: ArrayTranslationEnum.deleteDialogMessage,\n default: () => 'Are you sure you want to delete the selected entry?',\n },\n { key: ArrayTranslationEnum.deleteDialogAccept, default: () => 'Yes' },\n { key: ArrayTranslationEnum.deleteDialogDecline, default: () => 'No' },\n];\n\nvar CombinatorTranslationEnum;\n(function (CombinatorTranslationEnum) {\n CombinatorTranslationEnum[\"clearDialogTitle\"] = \"clearDialogTitle\";\n CombinatorTranslationEnum[\"clearDialogMessage\"] = \"clearDialogMessage\";\n CombinatorTranslationEnum[\"clearDialogAccept\"] = \"clearDialogAccept\";\n CombinatorTranslationEnum[\"clearDialogDecline\"] = \"clearDialogDecline\";\n})(CombinatorTranslationEnum || (CombinatorTranslationEnum = {}));\nconst combinatorDefaultTranslations = [\n {\n key: CombinatorTranslationEnum.clearDialogTitle,\n default: () => 'Clear form?',\n },\n {\n key: CombinatorTranslationEnum.clearDialogMessage,\n default: () => 'Your data will be cleared. Do you want to proceed?',\n },\n { key: CombinatorTranslationEnum.clearDialogAccept, default: () => 'Yes' },\n { key: CombinatorTranslationEnum.clearDialogDecline, default: () => 'No' },\n];\n\nconst getI18nKeyPrefixBySchema = (schema, uischema) => {\n if (isInternationalized(uischema)) {\n return uischema.i18n;\n }\n return schema?.i18n ?? undefined;\n};\nconst transformPathToI18nPrefix = (path) => {\n return (path\n ?.split('.')\n .filter((segment) => !/^\\d+$/.test(segment))\n .join('.') || 'root');\n};\nconst getI18nKeyPrefix = (schema, uischema, path) => {\n return (getI18nKeyPrefixBySchema(schema, uischema) ??\n transformPathToI18nPrefix(path));\n};\nconst getI18nKey = (schema, uischema, path, key) => {\n return `${getI18nKeyPrefix(schema, uischema, path)}.${key}`;\n};\nconst addI18nKeyToPrefix = (i18nKeyPrefix, key) => {\n return `${i18nKeyPrefix}.${key}`;\n};\nconst defaultTranslator = (_id, defaultMessage) => defaultMessage;\nconst defaultErrorTranslator = (error, t, uischema) => {\n const i18nKey = getI18nKey(error.parentSchema, uischema, getControlPath(error), `error.${error.keyword}`);\n const specializedKeywordMessage = t(i18nKey, undefined, { error });\n if (specializedKeywordMessage !== undefined) {\n return specializedKeywordMessage;\n }\n const genericKeywordMessage = t(`error.${error.keyword}`, undefined, {\n error,\n });\n if (genericKeywordMessage !== undefined) {\n return genericKeywordMessage;\n }\n const messageCustomization = t(error.message, undefined, { error });\n if (messageCustomization !== undefined) {\n return messageCustomization;\n }\n if (error.keyword === 'required' &&\n error.message?.startsWith('must have required property')) {\n return t('is a required property', 'is a required property', { error });\n }\n return error.message;\n};\nconst getCombinedErrorMessage = (errors, et, t, schema, uischema, path) => {\n if (errors.length > 0 && t) {\n const customErrorKey = getI18nKey(schema, uischema, path, 'error.custom');\n const specializedErrorMessage = t(customErrorKey, undefined, {\n schema,\n uischema,\n path,\n errors,\n });\n if (specializedErrorMessage !== undefined) {\n return specializedErrorMessage;\n }\n }\n return formatErrorMessage(errors.map((error) => et(error, t, uischema)));\n};\nconst deriveLabelForUISchemaElement = (uischema, t) => {\n if (uischema.label === false) {\n return undefined;\n }\n if ((uischema.label === undefined ||\n uischema.label === null ||\n uischema.label === true) &&\n !isInternationalized(uischema)) {\n return undefined;\n }\n const stringifiedLabel = typeof uischema.label === 'string'\n ? uischema.label\n : JSON.stringify(uischema.label);\n const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema);\n const i18nKey = typeof i18nKeyPrefix === 'string'\n ? `${i18nKeyPrefix}.label`\n : stringifiedLabel;\n return t(i18nKey, stringifiedLabel, { uischema: uischema });\n};\nconst getArrayTranslations = (t, defaultTranslations, i18nKeyPrefix, label) => {\n const translations = {};\n defaultTranslations.forEach((controlElement) => {\n const key = addI18nKeyToPrefix(i18nKeyPrefix, controlElement.key);\n translations[controlElement.key] = t(key, controlElement.default(label));\n });\n return translations;\n};\nconst getCombinatorTranslations = (t, defaultTranslations, i18nKeyPrefix, label) => {\n const translations = {};\n defaultTranslations.forEach((controlElement) => {\n const key = addI18nKeyToPrefix(i18nKeyPrefix, controlElement.key);\n translations[controlElement.key] = t(key, controlElement.default(label));\n });\n return translations;\n};\n\nconst fetchLocale = (state) => {\n if (state === undefined) {\n return undefined;\n }\n return state.locale;\n};\nconst fetchTranslator = (state) => {\n if (state === undefined) {\n return defaultTranslator;\n }\n return state.translate;\n};\nconst fetchErrorTranslator = (state) => {\n if (state === undefined) {\n return defaultErrorTranslator;\n }\n return state.translateError;\n};\nconst getLocale = (state) => fetchLocale(get(state, 'jsonforms.i18n'));\nconst getTranslator = () => (state) => fetchTranslator(get(state, 'jsonforms.i18n'));\nconst getErrorTranslator = () => (state) => fetchErrorTranslator(get(state, 'jsonforms.i18n'));\n\nconst defaultJsonFormsI18nState = {\n locale: 'en',\n translate: defaultTranslator,\n translateError: defaultErrorTranslator,\n};\nconst i18nReducer = (state = defaultJsonFormsI18nState, action) => {\n switch (action.type) {\n case UPDATE_I18N: {\n const locale = action.locale ?? defaultJsonFormsI18nState.locale;\n const translate = action.translator ?? defaultJsonFormsI18nState.translate;\n const translateError = action.errorTranslator ?? defaultJsonFormsI18nState.translateError;\n if (locale !== state.locale ||\n translate !== state.translate ||\n translateError !== state.translateError) {\n return {\n ...state,\n locale,\n translate,\n translateError,\n };\n }\n return state;\n }\n case SET_TRANSLATOR:\n return {\n ...state,\n translate: action.translator ?? defaultTranslator,\n translateError: action.errorTranslator ?? defaultErrorTranslator,\n };\n case SET_LOCALE:\n return {\n ...state,\n locale: action.locale ?? navigator.languages[0],\n };\n default:\n return state;\n }\n};\n\nconst rendererReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_RENDERER:\n return state.concat([\n { tester: action.tester, renderer: action.renderer },\n ]);\n case REMOVE_RENDERER:\n return state.filter((t) => t.tester !== action.tester);\n default:\n return state;\n }\n};\n\nconst NOT_APPLICABLE = -1;\nconst isControl = (uischema) => !isEmpty(uischema) && uischema.scope !== undefined;\nconst schemaMatches = (predicate) => (uischema, schema, context) => {\n if (isEmpty(uischema) || !isControl(uischema)) {\n return false;\n }\n if (isEmpty(schema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n if (isEmpty(schemaPath)) {\n return false;\n }\n let currentDataSchema = schema;\n if (hasType(schema, 'object')) {\n currentDataSchema = resolveSchema(schema, schemaPath, context?.rootSchema);\n }\n if (currentDataSchema === undefined) {\n return false;\n }\n return predicate(currentDataSchema, context?.rootSchema);\n};\nconst schemaSubPathMatches = (subPath, predicate) => (uischema, schema, context) => {\n if (isEmpty(uischema) || !isControl(uischema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n let currentDataSchema = schema;\n if (hasType(schema, 'object')) {\n currentDataSchema = resolveSchema(schema, schemaPath, context?.rootSchema);\n }\n currentDataSchema = get(currentDataSchema, subPath);\n if (currentDataSchema === undefined) {\n return false;\n }\n return predicate(currentDataSchema, context?.rootSchema);\n};\nconst schemaTypeIs = (expectedType) => schemaMatches((schema) => !isEmpty(schema) && hasType(schema, expectedType));\nconst formatIs = (expectedFormat) => schemaMatches((schema) => !isEmpty(schema) &&\n schema.format === expectedFormat &&\n hasType(schema, 'string'));\nconst uiTypeIs = (expected) => (uischema) => !isEmpty(uischema) && uischema.type === expected;\nconst optionIs = (optionName, optionValue) => (uischema) => {\n if (isEmpty(uischema)) {\n return false;\n }\n const options = uischema.options;\n return !isEmpty(options) && options[optionName] === optionValue;\n};\nconst hasOption = (optionName) => (uischema) => {\n if (isEmpty(uischema)) {\n return false;\n }\n const options = uischema.options;\n return !isEmpty(options) && !isUndefined(options[optionName]);\n};\nconst scopeEndsWith = (expected) => (uischema) => {\n if (isEmpty(expected) || !isControl(uischema)) {\n return false;\n }\n return endsWith(uischema.scope, expected);\n};\nconst scopeEndIs = (expected) => (uischema) => {\n if (isEmpty(expected) || !isControl(uischema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n return !isEmpty(schemaPath) && last(schemaPath.split('/')) === expected;\n};\nconst and = (...testers) => (uischema, schema, context) => testers.reduce((acc, tester) => acc && tester(uischema, schema, context), true);\nconst or = (...testers) => (uischema, schema, context) => testers.reduce((acc, tester) => acc || tester(uischema, schema, context), false);\nconst rankWith = (rank, tester) => (uischema, schema, context) => {\n if (tester(uischema, schema, context)) {\n return rank;\n }\n return NOT_APPLICABLE;\n};\nconst withIncreasedRank = (by, rankedTester) => (uischema, schema, context) => {\n const rank = rankedTester(uischema, schema, context);\n if (rank === NOT_APPLICABLE) {\n return NOT_APPLICABLE;\n }\n return rank + by;\n};\nconst isBooleanControl = and(uiTypeIs('Control'), schemaTypeIs('boolean'));\nconst isObjectControl = and(uiTypeIs('Control'), schemaTypeIs('object'));\nconst isAllOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'allOf')));\nconst isAnyOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'anyOf')));\nconst isOneOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'oneOf')));\nconst isEnumControl = and(uiTypeIs('Control'), schemaMatches((schema) => isEnumSchema(schema)));\nconst isOneOfEnumControl = and(uiTypeIs('Control'), schemaMatches((schema) => isOneOfEnumSchema(schema)));\nconst isIntegerControl = and(uiTypeIs('Control'), schemaTypeIs('integer'));\nconst isNumberControl = and(uiTypeIs('Control'), schemaTypeIs('number'));\nconst isStringControl = and(uiTypeIs('Control'), schemaTypeIs('string'));\nconst isMultiLineControl = and(uiTypeIs('Control'), optionIs('multi', true));\nconst isDateControl = and(uiTypeIs('Control'), or(formatIs('date'), optionIs('format', 'date')));\nconst isTimeControl = and(uiTypeIs('Control'), or(formatIs('time'), optionIs('format', 'time')));\nconst isDateTimeControl = and(uiTypeIs('Control'), or(formatIs('date-time'), optionIs('format', 'date-time')));\nconst isObjectArray = and(schemaMatches((schema, rootSchema) => hasType(schema, 'array') &&\n !Array.isArray(resolveSchema(schema, 'items', rootSchema))\n), schemaSubPathMatches('items', (schema, rootSchema) => {\n const resolvedSchema = schema.$ref\n ? resolveSchema(rootSchema, schema.$ref, rootSchema)\n : schema;\n return hasType(resolvedSchema, 'object');\n}));\nconst isObjectArrayControl = and(uiTypeIs('Control'), isObjectArray);\nconst traverse = (any, pred, rootSchema) => {\n if (isArray(any)) {\n return reduce(any, (acc, el) => acc || traverse(el, pred, rootSchema), false);\n }\n if (pred(any)) {\n return true;\n }\n if (any.$ref) {\n const toTraverse = resolveSchema(rootSchema, any.$ref, rootSchema);\n if (toTraverse && !toTraverse.$ref) {\n return traverse(toTraverse, pred, rootSchema);\n }\n }\n if (any.items) {\n return traverse(any.items, pred, rootSchema);\n }\n if (any.properties) {\n return reduce(toPairs(any.properties), (acc, [_key, val]) => acc || traverse(val, pred, rootSchema), false);\n }\n return false;\n};\nconst isObjectArrayWithNesting = (uischema, schema, context) => {\n if (!uiTypeIs('Control')(uischema, schema, context)) {\n return false;\n }\n const schemaPath = uischema.scope;\n const resolvedSchema = resolveSchema(schema, schemaPath, context?.rootSchema ?? schema);\n let objectDepth = 0;\n if (resolvedSchema !== undefined && resolvedSchema.items !== undefined) {\n if (traverse(resolvedSchema.items, (val) => {\n if (val === schema) {\n return false;\n }\n if (val.$ref !== undefined) {\n return false;\n }\n if (val.anyOf || val.allOf) {\n return true;\n }\n if (val.oneOf && !isOneOfEnumSchema(val)) {\n return true;\n }\n if (hasType(val, 'object')) {\n objectDepth++;\n if (objectDepth === 2) {\n return true;\n }\n }\n if (hasType(val, 'array')) {\n return true;\n }\n return false;\n }, context?.rootSchema)) {\n return true;\n }\n if (uischema.options && uischema.options.detail) {\n if (typeof uischema.options.detail === 'string') {\n return uischema.options.detail.toUpperCase() !== 'DEFAULT';\n }\n else if (typeof uischema.options.detail === 'object' &&\n uischema.options.detail.type) {\n return true;\n }\n }\n }\n return false;\n};\nconst isArrayObjectControl = isObjectArrayControl;\nconst isPrimitiveArrayControl = and(uiTypeIs('Control'), schemaMatches((schema, rootSchema) => deriveTypes(schema).length !== 0 &&\n !Array.isArray(resolveSchema(schema, 'items', rootSchema))\n), schemaSubPathMatches('items', (schema, rootSchema) => {\n const resolvedSchema = schema.$ref\n ? resolveSchema(rootSchema, schema.$ref, rootSchema)\n : schema;\n const types = deriveTypes(resolvedSchema);\n return (types.length === 1 &&\n includes(['integer', 'number', 'boolean', 'string'], types[0]));\n}));\nconst isRangeControl = and(uiTypeIs('Control'), or(schemaTypeIs('number'), schemaTypeIs('integer')), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'maximum') &&\n Object.prototype.hasOwnProperty.call(schema, 'minimum') &&\n Object.prototype.hasOwnProperty.call(schema, 'default')), optionIs('slider', true));\nconst isNumberFormatControl = and(uiTypeIs('Control'), schemaTypeIs('integer'), optionIs('format', true));\nconst isCategorization = (category) => category.type === 'Categorization';\nconst isCategory = (uischema) => uischema.type === 'Category';\nconst hasCategory = (categorization) => {\n if (isEmpty(categorization.elements)) {\n return false;\n }\n return categorization.elements\n .map((elem) => isCategorization(elem) ? hasCategory(elem) : isCategory(elem))\n .reduce((prev, curr) => prev && curr, true);\n};\nconst categorizationHasCategory = (uischema) => hasCategory(uischema);\nconst not = (tester) => (uischema, schema, context) => !tester(uischema, schema, context);\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n NOT_APPLICABLE: NOT_APPLICABLE,\n isControl: isControl,\n schemaMatches: schemaMatches,\n schemaSubPathMatches: schemaSubPathMatches,\n schemaTypeIs: schemaTypeIs,\n formatIs: formatIs,\n uiTypeIs: uiTypeIs,\n optionIs: optionIs,\n hasOption: hasOption,\n scopeEndsWith: scopeEndsWith,\n scopeEndIs: scopeEndIs,\n and: and,\n or: or,\n rankWith: rankWith,\n withIncreasedRank: withIncreasedRank,\n isBooleanControl: isBooleanControl,\n isObjectControl: isObjectControl,\n isAllOfControl: isAllOfControl,\n isAnyOfControl: isAnyOfControl,\n isOneOfControl: isOneOfControl,\n isEnumControl: isEnumControl,\n isOneOfEnumControl: isOneOfEnumControl,\n isIntegerControl: isIntegerControl,\n isNumberControl: isNumberControl,\n isStringControl: isStringControl,\n isMultiLineControl: isMultiLineControl,\n isDateControl: isDateControl,\n isTimeControl: isTimeControl,\n isDateTimeControl: isDateTimeControl,\n isObjectArray: isObjectArray,\n isObjectArrayControl: isObjectArrayControl,\n isObjectArrayWithNesting: isObjectArrayWithNesting,\n isArrayObjectControl: isArrayObjectControl,\n isPrimitiveArrayControl: isPrimitiveArrayControl,\n isRangeControl: isRangeControl,\n isNumberFormatControl: isNumberFormatControl,\n isCategorization: isCategorization,\n isCategory: isCategory,\n hasCategory: hasCategory,\n categorizationHasCategory: categorizationHasCategory,\n not: not\n});\n\nconst uischemaRegistryReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_UI_SCHEMA:\n return state\n .slice()\n .concat({ tester: action.tester, uischema: action.uischema });\n case REMOVE_UI_SCHEMA: {\n const copy = state.slice();\n remove(copy, (entry) => entry.tester === action.tester);\n return copy;\n }\n default:\n return state;\n }\n};\nconst findMatchingUISchema = (state) => (jsonSchema, schemaPath, path) => {\n const match = maxBy(state, (entry) => entry.tester(jsonSchema, schemaPath, path));\n if (match !== undefined &&\n match.tester(jsonSchema, schemaPath, path) !== NOT_APPLICABLE) {\n return match.uischema;\n }\n return undefined;\n};\n\nconst jsonFormsReducerConfig = {\n core: coreReducer,\n renderers: rendererReducer,\n cells: cellReducer,\n config: configReducer,\n uischemas: uischemaRegistryReducer,\n defaultData: defaultDataReducer,\n i18n: i18nReducer,\n};\nconst findUISchema = (uischemas, schema, schemaPath, path, fallback = 'VerticalLayout', control, rootSchema) => {\n if (control && control.options && control.options.detail) {\n if (typeof control.options.detail === 'string') {\n if (control.options.detail.toUpperCase() === 'GENERATE') {\n if (typeof fallback === 'function') {\n return fallback();\n }\n return Generate.uiSchema(schema, fallback, undefined, rootSchema);\n }\n }\n else if (typeof control.options.detail === 'object') {\n if (control.options.detail.type &&\n typeof control.options.detail.type === 'string') {\n return control.options.detail;\n }\n }\n }\n const uiSchema = findMatchingUISchema(uischemas)(schema, schemaPath, path);\n if (uiSchema === undefined) {\n if (typeof fallback === 'function') {\n return fallback();\n }\n return Generate.uiSchema(schema, fallback, '#', rootSchema);\n }\n return uiSchema;\n};\n\nconst defaultMiddleware = (state, action, defaultReducer) => defaultReducer(state, action);\n\nconst getErrorsAt = (instancePath, schema, matchPath) => (state) => {\n const errors = state.errors ?? [];\n const additionalErrors = state.additionalErrors ?? [];\n return errorsAt(instancePath, schema, matchPath)(state.validationMode === 'ValidateAndHide'\n ? additionalErrors\n : [...errors, ...additionalErrors]);\n};\nconst errorAt = (instancePath, schema) => getErrorsAt(instancePath, schema, (path) => path === instancePath);\nconst subErrorsAt = (instancePath, schema) => getErrorsAt(instancePath, schema, (path) => path.startsWith(instancePath + '.'));\nconst getErrorAt = (instancePath, schema) => (state) => {\n return errorAt(instancePath, schema)(state.jsonforms.core);\n};\nconst getSubErrorsAt = (instancePath, schema) => (state) => subErrorsAt(instancePath, schema)(state.jsonforms.core);\nconst getData = (state) => extractData(get(state, 'jsonforms.core'));\nconst getSchema = (state) => extractSchema(get(state, 'jsonforms.core'));\nconst getUiSchema = (state) => extractUiSchema(get(state, 'jsonforms.core'));\nconst getAjv = (state) => extractAjv(get(state, 'jsonforms.core'));\nconst getRenderers = (state) => get(state, 'jsonforms.renderers');\nconst getCells = (state) => get(state, 'jsonforms.cells');\nconst getUISchemas = (state) => get(state, 'jsonforms.uischemas');\nconst extractData = (state) => get(state, 'data');\nconst extractSchema = (state) => get(state, 'schema');\nconst extractUiSchema = (state) => get(state, 'uischema');\nconst extractAjv = (state) => get(state, 'ajv');\nconst getConfig = (state) => state.jsonforms.config;\n\nconst isInherentlyEnabled = (state, ownProps, uischema, schema, rootData, config) => {\n if (state?.jsonforms?.readonly) {\n return false;\n }\n if (uischema && hasEnableRule(uischema)) {\n return isEnabled(uischema, rootData, ownProps?.path, getAjv(state));\n }\n if (typeof uischema?.options?.readonly === 'boolean') {\n return !uischema.options.readonly;\n }\n if (typeof uischema?.options?.readOnly === 'boolean') {\n return !uischema.options.readOnly;\n }\n if (typeof config?.readonly === 'boolean') {\n return !config.readonly;\n }\n if (typeof config?.readOnly === 'boolean') {\n return !config.readOnly;\n }\n if (schema?.readOnly === true) {\n return false;\n }\n if (typeof ownProps?.enabled === 'boolean') {\n return ownProps.enabled;\n }\n return true;\n};\n\nconst move = (array, index, delta) => {\n const newIndex = index + delta;\n if (newIndex < 0 || newIndex >= array.length) {\n return;\n }\n const indexes = [index, newIndex].sort((a, b) => a - b);\n array.splice(indexes[0], 2, array[indexes[1]], array[indexes[0]]);\n};\nconst moveUp = (array, toMove) => {\n move(array, toMove, -1);\n};\nconst moveDown = (array, toMove) => {\n move(array, toMove, 1);\n};\nconst isRequired = (schema, schemaPath, rootSchema) => {\n const pathSegments = schemaPath.split('/');\n const lastSegment = decode(pathSegments[pathSegments.length - 1]);\n const nextHigherSchemaSegments = pathSegments.slice(0, pathSegments.length - 2);\n const nextHigherSchemaPath = nextHigherSchemaSegments.join('/');\n const nextHigherSchema = Resolve.schema(schema, nextHigherSchemaPath, rootSchema);\n return (nextHigherSchema !== undefined &&\n nextHigherSchema.required !== undefined &&\n nextHigherSchema.required.indexOf(lastSegment) !== -1);\n};\nconst computeLabel = (label, required, hideRequiredAsterisk) => {\n return `${label ?? ''}${required && !hideRequiredAsterisk ? '*' : ''}`;\n};\nconst showAsRequired = (required, hideRequiredAsterisk) => {\n return required && !hideRequiredAsterisk;\n};\nconst createDefaultValue = (schema, rootSchema) => {\n const defaultValue = doCreateDefaultValue(schema, rootSchema);\n return defaultValue === undefined ? {} : defaultValue;\n};\nconst doCreateDefaultValue = (schema, rootSchema) => {\n const resolvedSchema = typeof schema.$ref === 'string'\n ? Resolve.schema(rootSchema, schema.$ref, rootSchema)\n : schema;\n if (resolvedSchema.default !== undefined) {\n return extractDefaults(resolvedSchema, rootSchema);\n }\n if (hasType(resolvedSchema, 'string')) {\n if (resolvedSchema.format === 'date-time' ||\n resolvedSchema.format === 'date' ||\n resolvedSchema.format === 'time') {\n return convertDateToString(new Date(), resolvedSchema.format);\n }\n return '';\n }\n if (hasType(resolvedSchema, 'integer') || hasType(resolvedSchema, 'number')) {\n return 0;\n }\n if (hasType(resolvedSchema, 'boolean')) {\n return false;\n }\n if (hasType(resolvedSchema, 'array')) {\n return [];\n }\n if (hasType(resolvedSchema, 'object')) {\n return extractDefaults(resolvedSchema, rootSchema);\n }\n if (hasType(resolvedSchema, 'null')) {\n return null;\n }\n const combinators = ['oneOf', 'anyOf', 'allOf'];\n for (const combinator of combinators) {\n if (schema[combinator] && Array.isArray(schema[combinator])) {\n const combinatorDefault = createDefaultValueForCombinatorSchema(schema[combinator], rootSchema);\n if (combinatorDefault !== undefined) {\n return combinatorDefault;\n }\n }\n }\n return undefined;\n};\nconst createDefaultValueForCombinatorSchema = (combinatorSchemas, rootSchema) => {\n if (combinatorSchemas.length > 0) {\n for (const combinatorSchema of combinatorSchemas) {\n const result = doCreateDefaultValue(combinatorSchema, rootSchema);\n if (result !== undefined) {\n return result;\n }\n }\n }\n return undefined;\n};\nconst extractDefaults = (schema, rootSchema) => {\n if (hasType(schema, 'object') && schema.default === undefined) {\n const result = {};\n for (const key in schema.properties) {\n const property = schema.properties[key];\n const resolvedProperty = property.$ref\n ? Resolve.schema(rootSchema, property.$ref, rootSchema)\n : property;\n if (resolvedProperty && resolvedProperty.default !== undefined) {\n result[key] = cloneDeep(resolvedProperty.default);\n }\n }\n if (schema.allOf && Array.isArray(schema.allOf)) {\n schema.allOf.forEach((allOfSchema) => {\n if (allOfSchema && allOfSchema.properties) {\n for (const key in allOfSchema.properties) {\n const property = allOfSchema.properties[key];\n const resolvedProperty = property.$ref\n ? Resolve.schema(rootSchema, property.$ref, rootSchema)\n : property;\n if (resolvedProperty && resolvedProperty.default !== undefined) {\n result[key] = cloneDeep(resolvedProperty.default);\n }\n }\n }\n });\n }\n return result;\n }\n return cloneDeep(schema.default);\n};\nconst isDescriptionHidden = (visible, description, isFocused, showUnfocusedDescription) => {\n return (description === undefined ||\n (description !== undefined && !visible) ||\n (!showUnfocusedDescription && !isFocused));\n};\nconst enumToEnumOptionMapper = (e, t, i18nKey) => {\n let label = typeof e === 'string' ? e : JSON.stringify(e);\n if (t) {\n if (i18nKey) {\n label = t(`${i18nKey}.${label}`, label);\n }\n else {\n label = t(label, label);\n }\n }\n return { label, value: e };\n};\nconst oneOfToEnumOptionMapper = (e, t, fallbackI18nKey) => {\n let label = e.title ??\n (typeof e.const === 'string' ? e.const : JSON.stringify(e.const));\n if (t) {\n if (e.i18n) {\n label = t(e.i18n, label);\n }\n else if (fallbackI18nKey) {\n label = t(`${fallbackI18nKey}.${label}`, label);\n }\n else {\n label = t(label, label);\n }\n }\n return {\n label,\n value: e.const,\n };\n};\nconst mapStateToControlProps = (state, ownProps) => {\n const { uischema } = ownProps;\n const rootData = getData(state);\n const path = composeWithUi(uischema, ownProps.path);\n const visible = ownProps.visible === undefined || hasShowRule(uischema)\n ? isVisible(uischema, rootData, ownProps.path, getAjv(state))\n : ownProps.visible;\n const controlElement = uischema;\n const id = ownProps.id;\n const rootSchema = getSchema(state);\n const required = controlElement.scope !== undefined &&\n isRequired(ownProps.schema, controlElement.scope, rootSchema);\n const resolvedSchema = Resolve.schema(ownProps.schema || rootSchema, controlElement.scope, rootSchema);\n const errors = getErrorAt(path, resolvedSchema)(state);\n const description = resolvedSchema !== undefined ? resolvedSchema.description : '';\n const data = Resolve.data(rootData, path);\n const labelDesc = createLabelDescriptionFrom(uischema, resolvedSchema);\n const label = labelDesc.show ? labelDesc.text : '';\n const config = getConfig(state);\n const enabled = isInherentlyEnabled(state, ownProps, uischema, resolvedSchema || rootSchema, rootData, config);\n const schema = resolvedSchema ?? rootSchema;\n const t = getTranslator()(state);\n const te = getErrorTranslator()(state);\n const i18nKeyPrefix = getI18nKeyPrefix(schema, uischema, path);\n const i18nLabel = t(getI18nKey(schema, uischema, path, 'label'), label, {\n schema,\n uischema,\n path,\n errors,\n });\n const i18nDescription = t(getI18nKey(schema, uischema, path, 'description'), description, { schema, uischema, path, errors });\n const i18nErrorMessage = getCombinedErrorMessage(errors, te, t, schema, uischema, path);\n return {\n data,\n description: i18nDescription,\n errors: i18nErrorMessage,\n label: i18nLabel,\n visible,\n enabled,\n id,\n path,\n required,\n uischema,\n schema,\n config: getConfig(state),\n cells: ownProps.cells || state.jsonforms.cells,\n rootSchema,\n i18nKeyPrefix,\n };\n};\nconst mapDispatchToControlProps = (dispatch) => ({\n handleChange(path, value) {\n dispatch(update(path, () => value));\n },\n});\nconst mapStateToEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.enum?.map((e) => enumToEnumOptionMapper(e, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path))) ||\n (props.schema.const && [\n enumToEnumOptionMapper(props.schema.const, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)),\n ]);\n return {\n ...props,\n options,\n };\n};\nconst mapStateToOneOfEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.oneOf?.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapStateToMultiEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n let items = props.schema.items;\n items =\n items && items.$ref\n ? resolveSchema(props.rootSchema, items.$ref, props.rootSchema)\n : items;\n const options = ownProps.options ||\n (items?.oneOf &&\n items.oneOf.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, state.jsonforms.i18n?.translate, getI18nKeyPrefix(props.schema, props.uischema, props.path)))) ||\n items?.enum?.map((e) => enumToEnumOptionMapper(e, state.jsonforms.i18n?.translate, getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapStateToMasterListItemProps = (state, ownProps) => {\n const { schema, path, uischema, childLabelProp, index } = ownProps;\n const childPath = compose(path, `${index}`);\n const childLabel = computeChildLabel(getData(state), childPath, childLabelProp, schema, getSchema(state), state.jsonforms.i18n.translate, uischema);\n return {\n ...ownProps,\n childLabel,\n };\n};\nconst mapStateToControlWithDetailProps = (state, ownProps) => {\n const { ...props } = mapStateToControlProps(state, ownProps);\n return {\n ...props,\n uischemas: state.jsonforms.uischemas,\n };\n};\nconst mapStateToArrayControlProps = (state, ownProps) => {\n const { path, schema, uischema, label, ...props } = mapStateToControlWithDetailProps(state, ownProps);\n const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);\n const childErrors = getSubErrorsAt(path, resolvedSchema)(state);\n return {\n ...props,\n label,\n path,\n uischema,\n schema: resolvedSchema,\n arraySchema: schema,\n childErrors,\n renderers: ownProps.renderers || getRenderers(state),\n cells: ownProps.cells || getCells(state),\n };\n};\nconst mapDispatchToArrayControlProps = (dispatch) => ({\n addItem: (path, value) => () => {\n dispatch(update(path, (array) => {\n if (array === undefined || array === null) {\n return [value];\n }\n array.push(value);\n return array;\n }, { type: 'ADD', values: [value] }));\n },\n removeItems: (path, toDelete) => () => {\n dispatch(update(path, (array) => {\n toDelete\n .sort((a, b) => a - b)\n .reverse()\n .forEach((s) => array.splice(s, 1));\n return array;\n }, { type: 'REMOVE', indices: toDelete }));\n },\n moveUp: (path, toMove) => () => {\n dispatch(update(path, (array) => {\n moveUp(array, toMove);\n return array;\n }, {\n type: 'MOVE',\n moves: [{ from: toMove, to: toMove - 1 }],\n }));\n },\n moveDown: (path, toMove) => () => {\n dispatch(update(path, (array) => {\n moveDown(array, toMove);\n return array;\n }, {\n type: 'MOVE',\n moves: [{ from: toMove, to: toMove + 1 }],\n }));\n },\n});\nconst mapDispatchToMultiEnumProps = (dispatch) => ({\n addItem: (path, value) => {\n dispatch(update(path, (data) => {\n if (data === undefined || data === null) {\n return [value];\n }\n data.push(value);\n return data;\n }));\n },\n removeItem: (path, toDelete) => {\n dispatch(update(path, (data) => {\n const indexInData = data.indexOf(toDelete);\n data.splice(indexInData, 1);\n return data;\n }));\n },\n});\nconst layoutDefaultProps = {\n visible: true,\n enabled: true,\n path: '',\n direction: 'column',\n};\nconst getDirection = (uischema) => {\n if (uischema.type === 'HorizontalLayout') {\n return 'row';\n }\n if (uischema.type === 'VerticalLayout') {\n return 'column';\n }\n return layoutDefaultProps.direction;\n};\nconst mapStateToLayoutProps = (state, ownProps) => {\n const rootData = getData(state);\n const { uischema } = ownProps;\n const visible = ownProps.visible === undefined || hasShowRule(uischema)\n ? isVisible(ownProps.uischema, rootData, ownProps.path, getAjv(state))\n : ownProps.visible;\n const data = Resolve.data(rootData, ownProps.path);\n const config = getConfig(state);\n const enabled = isInherentlyEnabled(state, ownProps, uischema, undefined,\n rootData, config);\n const t = getTranslator()(state);\n const label = isLabelable(uischema)\n ? deriveLabelForUISchemaElement(uischema, t)\n : undefined;\n return {\n ...layoutDefaultProps,\n renderers: ownProps.renderers || getRenderers(state),\n cells: ownProps.cells || getCells(state),\n visible,\n enabled,\n path: ownProps.path,\n data,\n uischema: ownProps.uischema,\n schema: ownProps.schema,\n direction: ownProps.direction ?? getDirection(uischema),\n config,\n label,\n };\n};\nconst mapStateToJsonFormsRendererProps = (state, ownProps) => {\n return {\n renderers: ownProps.renderers || get(state.jsonforms, 'renderers'),\n cells: ownProps.cells || get(state.jsonforms, 'cells'),\n schema: ownProps.schema || getSchema(state),\n rootSchema: getSchema(state),\n uischema: ownProps.uischema || getUiSchema(state),\n path: ownProps.path,\n enabled: ownProps.enabled,\n config: getConfig(state),\n };\n};\nconst controlDefaultProps = {\n ...layoutDefaultProps,\n errors: [],\n};\nconst mapStateToCombinatorRendererProps = (state, ownProps, keyword) => {\n const { data, schema, rootSchema, i18nKeyPrefix, label, ...props } = mapStateToControlProps(state, ownProps);\n const ajv = state.jsonforms.core.ajv;\n const structuralKeywords = [\n 'required',\n 'additionalProperties',\n 'type',\n 'enum',\n 'const',\n ];\n const dataIsValid = (errors) => {\n return (!errors ||\n errors.length === 0 ||\n !errors.find((e) => structuralKeywords.indexOf(e.keyword) !== -1));\n };\n let indexOfFittingSchema;\n for (let i = 0; i < schema[keyword]?.length; i++) {\n try {\n let _schema = schema[keyword][i];\n if (_schema.$ref) {\n _schema = Resolve.schema(rootSchema, _schema.$ref, rootSchema);\n }\n const valFn = ajv.compile(_schema);\n valFn(data);\n if (dataIsValid(valFn.errors)) {\n indexOfFittingSchema = i;\n break;\n }\n }\n catch (error) {\n console.debug(\"Combinator subschema is not self contained, can't hand it over to AJV\");\n }\n }\n return {\n data,\n schema,\n rootSchema,\n ...props,\n i18nKeyPrefix,\n label,\n indexOfFittingSchema,\n uischemas: getUISchemas(state),\n };\n};\nconst mapStateToAllOfProps = (state, ownProps) => mapStateToCombinatorRendererProps(state, ownProps, 'allOf');\nconst mapStateToAnyOfProps = (state, ownProps) => {\n return mapStateToCombinatorRendererProps(state, ownProps, 'anyOf');\n};\nconst mapStateToOneOfProps = (state, ownProps) => {\n return mapStateToCombinatorRendererProps(state, ownProps, 'oneOf');\n};\nconst mapStateToArrayLayoutProps = (state, ownProps) => {\n const { path, schema, uischema, errors, label, ...props } = mapStateToControlWithDetailProps(state, ownProps);\n const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);\n const t = getTranslator()(state);\n const childErrors = getCombinedErrorMessage(getSubErrorsAt(path, resolvedSchema)(state), getErrorTranslator()(state), t, undefined, undefined, undefined);\n const allErrors = errors +\n (errors.length > 0 && childErrors.length > 0 ? '\\n' : '') +\n childErrors;\n return {\n ...props,\n label,\n path,\n uischema,\n schema: resolvedSchema,\n arraySchema: schema,\n data: props.data ? props.data.length : 0,\n errors: allErrors,\n minItems: schema.minItems,\n };\n};\nconst mapStateToLabelProps = (state, props) => {\n const { uischema } = props;\n const visible = props.visible === undefined || hasShowRule(uischema)\n ? isVisible(props.uischema, getData(state), props.path, getAjv(state))\n : props.visible;\n const text = uischema.text;\n const t = getTranslator()(state);\n const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema);\n const i18nKey = i18nKeyPrefix ? `${i18nKeyPrefix}.text` : text ?? '';\n const i18nText = t(i18nKey, text, { uischema });\n return {\n text: i18nText,\n visible,\n config: getConfig(state),\n renderers: props.renderers || getRenderers(state),\n cells: props.cells || getCells(state),\n uischema,\n };\n};\nconst computeChildLabel = (data, childPath, childLabelProp, schema, rootSchema, translateFct, uiSchema) => {\n const childData = Resolve.data(data, childPath);\n if (!childLabelProp) {\n childLabelProp = getFirstPrimitiveProp(schema);\n }\n if (!childLabelProp) {\n return '';\n }\n const currentValue = get(childData, childLabelProp);\n if (currentValue === undefined) {\n return '';\n }\n const childSchema = Resolve.schema(schema, '#' + getPropPath(childLabelProp), rootSchema);\n let enumOption = undefined;\n if (isEnumSchema(childSchema)) {\n enumOption = enumToEnumOptionMapper(currentValue, translateFct, getI18nKeyPrefix(childSchema, findUiControl(uiSchema, childLabelProp), childPath + '.' + childLabelProp));\n }\n else if (isOneOfEnumSchema(childSchema)) {\n const oneOfArray = childSchema.oneOf;\n const oneOfSchema = oneOfArray.find((e) => isEqual(e.const, currentValue));\n if (oneOfSchema) {\n enumOption = oneOfToEnumOptionMapper(oneOfSchema, translateFct, getI18nKeyPrefix(oneOfSchema, undefined, childPath + '.' + childLabelProp));\n }\n }\n return enumOption ? enumOption.label : currentValue;\n};\n\nconst mapStateToCellProps = (state, ownProps) => {\n const { id, schema, path, uischema, renderers, cells } = ownProps;\n const rootData = getData(state);\n const visible = ownProps.visible !== undefined\n ? ownProps.visible\n : isVisible(uischema, rootData, undefined, getAjv(state));\n const rootSchema = getSchema(state);\n const config = getConfig(state);\n let enabled;\n if (state.jsonforms.readonly === true) {\n enabled = false;\n }\n else if (typeof ownProps.enabled === 'boolean') {\n enabled = ownProps.enabled;\n }\n else {\n enabled = isInherentlyEnabled(state, ownProps, uischema, schema || rootSchema, rootData, config);\n }\n const t = getTranslator()(state);\n const te = getErrorTranslator()(state);\n const errors = getCombinedErrorMessage(getErrorAt(path, schema)(state), te, t, schema, uischema, path);\n const isValid = isEmpty(errors);\n return {\n data: Resolve.data(rootData, path),\n visible,\n enabled,\n id,\n path,\n errors,\n isValid,\n schema,\n uischema,\n config: getConfig(state),\n rootSchema,\n renderers,\n cells,\n };\n};\nconst mapStateToDispatchCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const { renderers: _renderers, cells, ...otherOwnProps } = ownProps;\n return {\n ...props,\n ...otherOwnProps,\n cells: cells || state.jsonforms.cells || [],\n };\n};\nconst defaultMapStateToEnumCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.enum?.map((e) => enumToEnumOptionMapper(e, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path))) ||\n (props.schema.const && [\n enumToEnumOptionMapper(props.schema.const, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)),\n ]);\n return {\n ...props,\n options,\n };\n};\nconst mapStateToOneOfEnumCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.oneOf?.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapDispatchToCellProps = mapDispatchToControlProps;\nconst defaultMapDispatchToControlProps =\n(dispatch, ownProps) => {\n const { handleChange } = mapDispatchToCellProps(dispatch);\n return {\n handleChange: ownProps.handleChange || handleChange,\n };\n};\n\nconst createCombinatorRenderInfos = (combinatorSubSchemas, rootSchema, keyword, control, path, uischemas) => combinatorSubSchemas.map((subSchema, subSchemaIndex) => {\n const resolvedSubSchema = subSchema.$ref && Resolve.schema(rootSchema, subSchema.$ref, rootSchema);\n const schema = resolvedSubSchema ?? subSchema;\n return {\n schema,\n uischema: findUISchema(uischemas, schema, control.scope, path, undefined, control, rootSchema),\n label: subSchema.title ??\n resolvedSubSchema?.title ??\n `${keyword}-${subSchemaIndex}`,\n };\n});\n\nexport { ADD_CELL, ADD_DEFAULT_DATA, ADD_RENDERER, ADD_UI_SCHEMA, index$1 as Actions, ArrayTranslationEnum, CombinatorTranslationEnum, Draft4, Generate, Helpers, INIT, NOT_APPLICABLE, Paths, REMOVE_CELL, REMOVE_DEFAULT_DATA, REMOVE_RENDERER, REMOVE_UI_SCHEMA, Resolve, RuleEffect, Runtime, SET_AJV, SET_CONFIG, SET_LOCALE, SET_SCHEMA, SET_TRANSLATOR, SET_UISCHEMA, SET_VALIDATION_MODE, index as Test, UPDATE_CORE, UPDATE_DATA, UPDATE_ERRORS, UPDATE_I18N, VALIDATE, addI18nKeyToPrefix, and, arrayDefaultTranslations, categorizationHasCategory, cellReducer, clearAllIds, combinatorDefaultTranslations, compose, compose as composePaths, composeWithUi, computeChildLabel, computeLabel, configReducer, controlDefaultProps, convertDateToString, convertToValidClassName, coreReducer, createAjv, createCleanLabel, createCombinatorRenderInfos, createControlElement, createDefaultValue, createId, createLabelDescriptionFrom, decode, defaultDataReducer, defaultDateFormat, defaultDateTimeFormat, defaultErrorTranslator, defaultJsonFormsI18nState, defaultMapDispatchToControlProps, defaultMapStateToEnumCellProps, defaultMiddleware, defaultTimeFormat, defaultTranslator, deriveLabelForUISchemaElement, deriveTypes, doCreateDefaultValue, encode, enumToEnumOptionMapper, errorAt, errorsAt, evalEnablement, evalVisibility, extractAjv, extractData, extractDefaultData, extractDefaults, extractSchema, extractUiSchema, fetchErrorTranslator, fetchLocale, fetchTranslator, findAllRefs, findMatchingUISchema, findUISchema, findUiControl, formatErrorMessage, formatIs, generateDefaultUISchema, generateJsonSchema, getAdditionalErrors, getAjv, getArrayTranslations, getCells, getCombinatorTranslations, getCombinedErrorMessage, getConfig, getControlPath, getData, getDefaultData, getErrorAt, getErrorTranslator, getFirstPrimitiveProp, getI18nKey, getI18nKeyPrefix, getI18nKeyPrefixBySchema, getLocale, getOrCreateAjv, getPropPath, getRenderers, getSchema, getSubErrorsAt, getTranslator, getUISchemas, getUiSchema, getValidationMode, hasCategory, hasEnableRule, hasOption, hasShowRule, hasType, i18nReducer, init, initState, isAllOfControl, isAnyOfControl, isArrayObjectControl, isBooleanControl, isCategorization, isCategory, isControl, isControlElement, isDateControl, isDateTimeControl, isDescriptionHidden, isEnabled, isEnumControl, isEnumSchema, isGroup, isInherentlyEnabled, isIntegerControl, isInternationalized, isLabelable, isLabeled, isLayout, isMultiLineControl, isNumberControl, isNumberFormatControl, isObjectArray, isObjectArrayControl, isObjectArrayWithNesting, isObjectControl, isOneOfControl, isOneOfEnumControl, isOneOfEnumSchema, isPrimitiveArrayControl, isRangeControl, isScopable, isScoped, isStringControl, isTimeControl, isUpdateArrayContext, isVisible, iterateSchema, jsonFormsReducerConfig, layoutDefaultProps, mapDispatchToArrayControlProps, mapDispatchToCellProps, mapDispatchToControlProps, mapDispatchToMultiEnumProps, mapStateToAllOfProps, mapStateToAnyOfProps, mapStateToArrayControlProps, mapStateToArrayLayoutProps, mapStateToCellProps, mapStateToCombinatorRendererProps, mapStateToControlProps, mapStateToControlWithDetailProps, mapStateToDispatchCellProps, mapStateToEnumControlProps, mapStateToJsonFormsRendererProps, mapStateToLabelProps, mapStateToLayoutProps, mapStateToMasterListItemProps, mapStateToMultiEnumControlProps, mapStateToOneOfEnumCellProps, mapStateToOneOfEnumControlProps, mapStateToOneOfProps, moveDown, moveUp, not, oneOfToEnumOptionMapper, optionIs, or, rankWith, registerCell, registerDefaultData, registerRenderer, registerUISchema, removeId, rendererReducer, resolveData, resolveSchema, schemaMatches, schemaSubPathMatches, schemaTypeIs, scopeEndIs, scopeEndsWith, setAjv, setConfig, setLocale, setReadonly, setSchema, setTranslator, setUISchema, setValidationMode, showAsRequired, subErrorsAt, toDataPath, toDataPathSegments, transformPathToI18nPrefix, uiTypeIs, uischemaRegistryReducer, unregisterCell, unregisterDefaultData, unregisterRenderer, unregisterUISchema, unsetReadonly, update, updateCore, updateErrors, updateI18n, validate, withIncreasedRank };\n//# sourceMappingURL=jsonforms-core.esm.js.map\n"],"names":["ADDITIONAL_PROPERTIES","REQUIRED_PROPERTIES","Gen","constructor","findOption","this","schemaObject","data","props","properties","schema","type","additionalProperties","required","length","Object","keys","reduce","acc","propName","property","Number","isInteger","schemaObjectOrArray","Array","schemaArray","uniqueProperties","discriminator","known","filter","item","discriminatorValue","prototype","hasOwnProperty","call","distinct","map","prop","JSON","stringify","items","oneOf","generateJsonSchema","instance","options","optionName","compose","Set","path1","path2","p1","startsWith","toDataPathSegments","schemaPath","decodedSegments","replace","split","decode","startIndex","idx","encode","segment","pointerSegment","deriveLabel","controlElement","schemaElement","title","scope","ref","label","substr","lastIndexOf","createLabelDescriptionFrom","withLabel","labelProperty","labelDescription","text","show","resolveData","dataPath","curInstance","decodedSegment","resolveSchema","rootSchema","segments","resolveSchemaWithSegments","pathSegments","$ref","remainingSegments","pathSegment","undefined","singleSegmentResolveSchema","resolvedSchema","alternativeResolveResult","subSchemas","concat","allOf","anyOf","then","else","subSchema","RuleEffect","composeWithUi","scopableUi","path","isScoped","join","isInternationalized","element","i18n","isGroup","layout","isLayout","uischema","elements","obj","isScopable","isLabelable","getConditionScope","condition","evaluateCondition","ajv","isAndCondition","conditions","cur","isOrCondition","isLeafCondition","expectedValue","isSchemaCondition","value","failWhenUndefined","validate","isValidateFunctionCondition","context","fullData","uischemaElement","isRuleFulfilled","rule","hasShowRule","effect","SHOW","HIDE","isVisible","fulfilled","evalVisibility","isEnabled","DISABLE","ENABLE","evalEnablement","isOneOfEnumSchema","every","s","const","isEnumSchema","hasType","jsonSchema","expected","deriveTypes","enum","types","forEach","enumElement","add","from","allOfType","Resolve","createAjv","allErrors","verbose","strict","addUsedSchema","validator","errors","getControlPath","error","controlPath","instancePath","invalidProperty","keyword","params","missingProperty","additionalProperty","getInvalidProperty","endsWith","isObjectSchema","filteredErrorKeywords","createLayout","layoutType","createControlElement","generateUISchema","schemaElements","currentRef","schemaName","isCombinator","controlObject","push","labelName","fixedLabel","addLabel","nextRef","Error","generateDefaultUISchema","prefix","verticalLayout","wrapInLayoutIfNecessary","Generate","uiSchema","INIT","UPDATE_CORE","SET_AJV","UPDATE_DATA","UPDATE_ERRORS","ADD_RENDERER","REMOVE_RENDERER","ADD_CELL","REMOVE_CELL","SET_CONFIG","ADD_UI_SCHEMA","REMOVE_UI_SCHEMA","SET_SCHEMA","SET_UISCHEMA","SET_VALIDATION_MODE","SET_LOCALE","SET_TRANSLATOR","UPDATE_I18N","ADD_DEFAULT_DATA","REMOVE_DEFAULT_DATA","update","updater","index$1","freeze","__proto__","VALIDATE","isUpdateArrayContext","isArray","values","indices","i","moves","m","to","init","updateCore","registerDefaultData","unregisterDefaultData","setAjv","updateErrors","registerRenderer","tester","renderer","registerCell","cell","unregisterCell","unregisterRenderer","setConfig","config","setValidationMode","validationMode","registerUISchema","unregisterUISchema","setLocale","locale","setSchema","setTranslator","translator","errorTranslator","updateI18n","setUISchema","configDefault","restrict","trim","showUnfocusedDescription","hideRequiredAsterisk","applyDefaultConfiguration","configReducer","state","action","initState","additionalErrors","getValidationMode","hasValidationModeOption","option","getAdditionalErrors","getOrCreateAjv","hasAjvOption","compile","coreReducer","thisAjv","v","e","currentAjv","result","oldData","newData","newState","ArrayTranslationEnum","addTooltip","addAriaLabel","removeTooltip","removeAriaLabel","upAriaLabel","up","down","downAriaLabel","noDataMessage","noSelection","deleteDialogTitle","deleteDialogMessage","deleteDialogAccept","deleteDialogDecline","CombinatorTranslationEnum","clearDialogTitle","clearDialogMessage","clearDialogAccept","clearDialogDecline","getI18nKeyPrefixBySchema","getI18nKeyPrefix","test","transformPathToI18nPrefix","getI18nKey","key","defaultTranslator","_id","defaultMessage","defaultErrorTranslator","t","specializedKeywordMessage","parentSchema","genericKeywordMessage","messageCustomization","message","getCombinedErrorMessage","et","customErrorKey","specializedErrorMessage","formatErrorMessage","getTranslator","translate","fetchTranslator","getErrorTranslator","translateError","fetchErrorTranslator","defaultJsonFormsI18nState","i18nReducer","navigator","languages","isControl","schemaMatches","predicate","currentDataSchema","schemaSubPathMatches","subPath","schemaTypeIs","expectedType","formatIs","expectedFormat","format","uiTypeIs","optionIs","optionValue","and","testers","or","rankWith","rank","isBooleanControl","isEnumControl","isStringControl","isObjectArray","getErrorsAt","matchPath","combinatorPaths","indexOf","findIndex","p","errorsAt","getErrorAt","errorAt","jsonforms","core","getSubErrorsAt","subErrorsAt","getData","extractData","getSchema","extractSchema","getUiSchema","extractUiSchema","getAjv","extractAjv","getRenderers","getCells","getConfig","isInherentlyEnabled","ownProps","rootData","readonly","hasEnableRule","readOnly","enabled","move","array","index","delta","newIndex","indexes","sort","a","b","splice","computeLabel","createDefaultValue","defaultValue","doCreateDefaultValue","default","extractDefaults","date","dateString","toISOString","convertDateToString","Date","combinators","combinator","combinatorDefault","createDefaultValueForCombinatorSchema","combinatorSchemas","combinatorSchema","resolvedProperty","allOfSchema","isDescriptionHidden","visible","description","isFocused","enumToEnumOptionMapper","i18nKey","mapStateToControlProps","id","lastSegment","nextHigherSchemaPath","slice","nextHigherSchema","isRequired","labelDesc","te","i18nKeyPrefix","i18nLabel","cells","mapDispatchToControlProps","dispatch","handleChange","mapStateToControlWithDetailProps","uischemas","mapDispatchToArrayControlProps","addItem","removeItems","toDelete","reverse","moveUp","toMove","moveDown","layoutDefaultProps","direction","getDirection","mapStateToLayoutProps","stringifiedLabel","deriveLabelForUISchemaElement","renderers","mapStateToJsonFormsRendererProps","mapStateToArrayLayoutProps","childErrors","arraySchema","minItems"],"sourceRoot":""}
1
+ {"version":3,"file":"npm.jsonforms.283.xxxxxxxxxxxxxxxxxxxx.js","mappings":"g7BA0BA,MAAMA,EAAwB,uBACxBC,EAAsB,WAc5B,MAAMC,EACF,WAAAC,CAAYC,GACRC,KAAKD,WAAaA,EAClBC,KAAKC,aAAgBC,IACjB,MAAMC,EAAQH,KAAKI,WAAWF,GACxBG,EAAS,CACXC,KAAM,SACNF,WAAYD,EACZI,qBAAsBP,KAAKD,WAAWI,EAAhBH,CAAuBL,IAE3Ca,EAAWR,KAAKD,WAAWI,EAAhBH,CAAuBJ,GAIxC,OAHIY,EAASC,OAAS,IAClBJ,EAAOG,SAAWA,GAEfH,GAEXL,KAAKI,WAAcF,GAERQ,OAAOC,KAAKT,GAAMU,OAAO,CAACC,EAAKC,KAClCD,EAAIC,GAAYd,KAAKe,SAASb,EAAKY,IAC5BD,GAHQ,CAAC,GAMxBb,KAAKe,SAAYb,IACb,cAAeA,GACX,IAAK,SACD,MAAO,CAAEI,KAAM,UACnB,IAAK,UACD,MAAO,CAAEA,KAAM,WACnB,IAAK,SACD,OAAIU,OAAOC,UAAUf,GACV,CAAEI,KAAM,WAEZ,CAAEA,KAAM,UACnB,IAAK,SACD,OAAY,MAARJ,EACO,CAAEI,KAAM,QAEZN,KAAKkB,oBAAoBhB,GACpC,QACI,MAAO,CAAC,IAGpBF,KAAKkB,oBAAuBhB,GACpBA,aAAgBiB,MACTnB,KAAKoB,YAAYlB,GAGjBF,KAAKC,aAAaC,GAGjCF,K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AQgE,KAAqBhE,GAAQkD,OAAG3O,OAAWA,OAAWA,GACzI6E,EAAYK,GACbA,EAAO9J,OAAS,GAAKuc,EAAYvc,OAAS,EAAI,KAAO,IACtDuc,EACJ,MAAO,IACA7c,EACH6D,QACAmC,OACAS,WACAvG,OAAQkF,EACR0X,YAAa5c,EACbH,KAAMC,EAAMD,KAAOC,EAAMD,KAAKO,OAAS,EACvC8J,OAAQL,EACRgT,SAAU7c,EAAO6c,U","sources":["webpack://@genesislcap/design-system-configurator/../../../node_modules/@jsonforms/core/lib/jsonforms-core.esm.js"],"sourcesContent":["import isEmpty from 'lodash/isEmpty';\nimport startCase from 'lodash/startCase';\nimport keys from 'lodash/keys';\nimport range from 'lodash/range';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport find from 'lodash/find';\nimport isArray from 'lodash/isArray';\nimport includes from 'lodash/includes';\nimport Ajv from 'ajv';\nimport addFormats from 'ajv-formats';\nimport filter from 'lodash/filter';\nimport isEqual from 'lodash/isEqual';\nimport merge from 'lodash/merge';\nimport cloneDeep from 'lodash/cloneDeep';\nimport setFp from 'lodash/fp/set';\nimport unsetFp from 'lodash/fp/unset';\nimport isFunction from 'lodash/isFunction';\nimport maxBy from 'lodash/maxBy';\nimport remove from 'lodash/remove';\nimport endsWith from 'lodash/endsWith';\nimport last from 'lodash/last';\nimport reduce from 'lodash/reduce';\nimport toPairs from 'lodash/toPairs';\nimport isUndefined from 'lodash/isUndefined';\n\nconst ADDITIONAL_PROPERTIES = 'additionalProperties';\nconst REQUIRED_PROPERTIES = 'required';\nconst distinct = (properties, discriminator) => {\n const known = {};\n return properties.filter((item) => {\n const discriminatorValue = discriminator(item);\n if (Object.prototype.hasOwnProperty.call(known, discriminatorValue)) {\n return false;\n }\n else {\n known[discriminatorValue] = true;\n return true;\n }\n });\n};\nclass Gen {\n constructor(findOption) {\n this.findOption = findOption;\n this.schemaObject = (data) => {\n const props = this.properties(data);\n const schema = {\n type: 'object',\n properties: props,\n additionalProperties: this.findOption(props)(ADDITIONAL_PROPERTIES),\n };\n const required = this.findOption(props)(REQUIRED_PROPERTIES);\n if (required.length > 0) {\n schema.required = required;\n }\n return schema;\n };\n this.properties = (data) => {\n const emptyProps = {};\n return Object.keys(data).reduce((acc, propName) => {\n acc[propName] = this.property(data[propName]);\n return acc;\n }, emptyProps);\n };\n this.property = (data) => {\n switch (typeof data) {\n case 'string':\n return { type: 'string' };\n case 'boolean':\n return { type: 'boolean' };\n case 'number':\n if (Number.isInteger(data)) {\n return { type: 'integer' };\n }\n return { type: 'number' };\n case 'object':\n if (data == null) {\n return { type: 'null' };\n }\n return this.schemaObjectOrArray(data);\n default:\n return {};\n }\n };\n this.schemaObjectOrArray = (data) => {\n if (data instanceof Array) {\n return this.schemaArray(data);\n }\n else {\n return this.schemaObject(data);\n }\n };\n this.schemaArray = (data) => {\n if (data.length > 0) {\n const allProperties = data.map(this.property);\n const uniqueProperties = distinct(allProperties, (prop) => JSON.stringify(prop));\n if (uniqueProperties.length === 1) {\n return {\n type: 'array',\n items: uniqueProperties[0],\n };\n }\n else {\n return {\n type: 'array',\n items: {\n oneOf: uniqueProperties,\n },\n };\n }\n }\n else {\n return {\n type: 'array',\n items: {},\n };\n }\n };\n }\n}\nconst generateJsonSchema = (\ninstance, options = {}) => {\n const findOption = (props) => (optionName) => {\n switch (optionName) {\n case ADDITIONAL_PROPERTIES:\n if (Object.prototype.hasOwnProperty.call(options, ADDITIONAL_PROPERTIES)) {\n return options[ADDITIONAL_PROPERTIES];\n }\n return true;\n case REQUIRED_PROPERTIES:\n if (Object.prototype.hasOwnProperty.call(options, REQUIRED_PROPERTIES)) {\n return options[REQUIRED_PROPERTIES](props);\n }\n return Object.keys(props);\n default:\n return;\n }\n };\n const gen = new Gen(findOption);\n return gen.schemaObject(instance);\n};\n\nconst usedIds = new Set();\nconst makeId = (idBase, iteration) => iteration <= 1 ? idBase : idBase + iteration.toString();\nconst isUniqueId = (idBase, iteration) => {\n const newID = makeId(idBase, iteration);\n return !usedIds.has(newID);\n};\nconst createId = (proposedId) => {\n if (proposedId === undefined) {\n proposedId = 'undefined';\n }\n let tries = 0;\n while (!isUniqueId(proposedId, tries)) {\n tries++;\n }\n const newID = makeId(proposedId, tries);\n usedIds.add(newID);\n return newID;\n};\nconst removeId = (id) => usedIds.delete(id);\nconst clearAllIds = () => usedIds.clear();\n\nconst compose = (path1, path2) => {\n let p1 = path1;\n if (!isEmpty(path1) && !isEmpty(path2) && !path2.startsWith('[')) {\n p1 = path1 + '.';\n }\n if (isEmpty(p1)) {\n return path2;\n }\n else if (isEmpty(path2)) {\n return p1;\n }\n else {\n return `${p1}${path2}`;\n }\n};\nconst toDataPathSegments = (schemaPath) => {\n const s = schemaPath\n .replace(/(anyOf|allOf|oneOf)\\/[\\d]+\\//g, '')\n .replace(/(then|else)\\//g, '');\n const segments = s.split('/');\n const decodedSegments = segments.map(decode);\n const startFromRoot = decodedSegments[0] === '#' || decodedSegments[0] === '';\n const startIndex = startFromRoot ? 2 : 1;\n return range(startIndex, decodedSegments.length, 2).map((idx) => decodedSegments[idx]);\n};\nconst toDataPath = (schemaPath) => {\n return toDataPathSegments(schemaPath).join('.');\n};\nconst encode = (segment) => segment?.replace(/~/g, '~0').replace(/\\//g, '~1');\nconst decode = (pointerSegment) => pointerSegment?.replace(/~1/g, '/').replace(/~0/, '~');\nconst getPropPath = (path) => {\n return `/properties/${path\n .split('.')\n .map((p) => encode(p))\n .join('/properties/')}`;\n};\n\nconst deriveLabel = (controlElement, schemaElement) => {\n if (schemaElement && typeof schemaElement.title === 'string') {\n return schemaElement.title;\n }\n if (typeof controlElement.scope === 'string') {\n const ref = controlElement.scope;\n const label = decode(ref.substr(ref.lastIndexOf('/') + 1));\n return startCase(label);\n }\n return '';\n};\nconst createCleanLabel = (label) => {\n return startCase(label.replace('_', ' '));\n};\nconst createLabelDescriptionFrom = (withLabel, schema) => {\n const labelProperty = withLabel.label;\n if (typeof labelProperty === 'boolean') {\n return labelDescription(deriveLabel(withLabel, schema), labelProperty);\n }\n if (typeof labelProperty === 'string') {\n return labelDescription(labelProperty, true);\n }\n if (typeof labelProperty === 'object') {\n const label = typeof labelProperty.text === 'string'\n ? labelProperty.text\n : deriveLabel(withLabel, schema);\n const show = typeof labelProperty.show === 'boolean' ? labelProperty.show : true;\n return labelDescription(label, show);\n }\n return labelDescription(deriveLabel(withLabel, schema), true);\n};\nconst labelDescription = (text, show) => ({\n text: text,\n show: show,\n});\n\nconst isObjectSchema$1 = (schema) => {\n return schema.properties !== undefined;\n};\nconst isArraySchema = (schema) => {\n return schema.type === 'array' && schema.items !== undefined;\n};\nconst resolveData = (instance, dataPath) => {\n if (isEmpty(dataPath)) {\n return instance;\n }\n const dataPathSegments = dataPath.split('.');\n return dataPathSegments.reduce((curInstance, decodedSegment) => {\n if (!curInstance ||\n !Object.prototype.hasOwnProperty.call(curInstance, decodedSegment)) {\n return undefined;\n }\n return curInstance[decodedSegment];\n }, instance);\n};\nconst findAllRefs = (schema, result = {}, resolveTuples = false) => {\n if (isObjectSchema$1(schema)) {\n Object.keys(schema.properties).forEach((key) => findAllRefs(schema.properties[key], result));\n }\n if (isArraySchema(schema)) {\n if (Array.isArray(schema.items)) {\n if (resolveTuples) {\n const items = schema.items;\n items.forEach((child) => findAllRefs(child, result));\n }\n }\n else {\n findAllRefs(schema.items, result);\n }\n }\n if (Array.isArray(schema.anyOf)) {\n const anyOf = schema.anyOf;\n anyOf.forEach((child) => findAllRefs(child, result));\n }\n if (schema.$ref !== undefined) {\n result[schema.$ref] = schema;\n }\n return result;\n};\nconst invalidSegment = (pathSegment) => pathSegment === '#' || pathSegment === undefined || pathSegment === '';\nconst resolveSchema = (schema, schemaPath, rootSchema) => {\n const segments = schemaPath?.split('/').map(decode);\n return resolveSchemaWithSegments(schema, segments, rootSchema);\n};\nconst resolveSchemaWithSegments = (schema, pathSegments, rootSchema) => {\n if (typeof schema?.$ref === 'string') {\n schema = resolveSchema(rootSchema, schema.$ref, rootSchema);\n }\n if (!pathSegments || pathSegments.length === 0) {\n return schema;\n }\n if (isEmpty(schema)) {\n return undefined;\n }\n const [segment, ...remainingSegments] = pathSegments;\n if (invalidSegment(segment)) {\n return resolveSchemaWithSegments(schema, remainingSegments, rootSchema);\n }\n const singleSegmentResolveSchema = get(schema, segment);\n const resolvedSchema = resolveSchemaWithSegments(singleSegmentResolveSchema, remainingSegments, rootSchema);\n if (resolvedSchema) {\n return resolvedSchema;\n }\n if (segment === 'properties' || segment === 'items') {\n let alternativeResolveResult = undefined;\n const subSchemas = [].concat(schema.oneOf ?? [], schema.allOf ?? [], schema.anyOf ?? [], schema.then ?? [], schema.else ?? []);\n for (const subSchema of subSchemas) {\n alternativeResolveResult = resolveSchemaWithSegments(subSchema, [segment, ...remainingSegments], rootSchema);\n if (alternativeResolveResult) {\n break;\n }\n }\n return alternativeResolveResult;\n }\n return undefined;\n};\n\nconst Draft4 = {\n id: 'http://json-schema.org/draft-04/schema#',\n $schema: 'http://json-schema.org/draft-04/schema#',\n description: 'Core schema meta-schema',\n definitions: {\n schemaArray: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#' },\n },\n positiveInteger: {\n type: 'integer',\n minimum: 0,\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: '#/definitions/positiveInteger' }, { default: 0 }],\n },\n simpleTypes: {\n enum: [\n 'array',\n 'boolean',\n 'integer',\n 'null',\n 'number',\n 'object',\n 'string',\n ],\n },\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n uniqueItems: true,\n },\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n format: 'uri',\n },\n $schema: {\n type: 'string',\n format: 'uri',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n default: {},\n multipleOf: {\n type: 'number',\n minimum: 0,\n exclusiveMinimum: true,\n },\n maximum: {\n type: 'number',\n },\n exclusiveMaximum: {\n type: 'boolean',\n default: false,\n },\n minimum: {\n type: 'number',\n },\n exclusiveMinimum: {\n type: 'boolean',\n default: false,\n },\n maxLength: { $ref: '#/definitions/positiveInteger' },\n minLength: { $ref: '#/definitions/positiveIntegerDefault0' },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n additionalItems: {\n anyOf: [{ type: 'boolean' }, { $ref: '#' }],\n default: {},\n },\n items: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],\n default: {},\n },\n maxItems: { $ref: '#/definitions/positiveInteger' },\n minItems: { $ref: '#/definitions/positiveIntegerDefault0' },\n uniqueItems: {\n type: 'boolean',\n default: false,\n },\n maxProperties: { $ref: '#/definitions/positiveInteger' },\n minProperties: { $ref: '#/definitions/positiveIntegerDefault0' },\n required: { $ref: '#/definitions/stringArray' },\n additionalProperties: {\n anyOf: [{ type: 'boolean' }, { $ref: '#' }],\n default: {},\n },\n definitions: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n properties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n patternProperties: {\n type: 'object',\n additionalProperties: { $ref: '#' },\n default: {},\n },\n dependencies: {\n type: 'object',\n additionalProperties: {\n anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }],\n },\n },\n enum: {\n type: 'array',\n minItems: 1,\n uniqueItems: true,\n },\n type: {\n anyOf: [\n { $ref: '#/definitions/simpleTypes' },\n {\n type: 'array',\n items: { $ref: '#/definitions/simpleTypes' },\n minItems: 1,\n uniqueItems: true,\n },\n ],\n },\n allOf: { $ref: '#/definitions/schemaArray' },\n anyOf: { $ref: '#/definitions/schemaArray' },\n oneOf: { $ref: '#/definitions/schemaArray' },\n not: { $ref: '#' },\n },\n dependencies: {\n exclusiveMaximum: ['maximum'],\n exclusiveMinimum: ['minimum'],\n },\n default: {},\n};\n\nvar RuleEffect;\n(function (RuleEffect) {\n RuleEffect[\"HIDE\"] = \"HIDE\";\n RuleEffect[\"SHOW\"] = \"SHOW\";\n RuleEffect[\"ENABLE\"] = \"ENABLE\";\n RuleEffect[\"DISABLE\"] = \"DISABLE\";\n})(RuleEffect || (RuleEffect = {}));\n\nconst setReadonlyPropertyValue = (value) => (child) => {\n if (!child.options) {\n child.options = {};\n }\n child.options.readonly = value;\n};\nconst setReadonly = (uischema) => {\n iterateSchema(uischema, setReadonlyPropertyValue(true));\n};\nconst unsetReadonly = (uischema) => {\n iterateSchema(uischema, setReadonlyPropertyValue(false));\n};\nconst iterateSchema = (uischema, toApply) => {\n if (isEmpty(uischema)) {\n return;\n }\n if (isLayout(uischema)) {\n uischema.elements.forEach((child) => iterateSchema(child, toApply));\n return;\n }\n toApply(uischema);\n};\nconst findUiControl = (uiSchema, path) => {\n if (isControlElement(uiSchema)) {\n if (isScoped(uiSchema) && uiSchema.scope.endsWith(getPropPath(path))) {\n return uiSchema;\n }\n else if (uiSchema.options?.detail) {\n return findUiControl(uiSchema.options.detail, path);\n }\n }\n if (isLayout(uiSchema)) {\n for (const elem of uiSchema.elements) {\n const result = findUiControl(elem, path);\n if (result !== undefined)\n return result;\n }\n }\n return undefined;\n};\nconst composeWithUi = (scopableUi, path) => {\n if (!isScoped(scopableUi)) {\n return path ?? '';\n }\n const segments = toDataPathSegments(scopableUi.scope);\n if (isEmpty(segments)) {\n return path ?? '';\n }\n return compose(path, segments.join('.'));\n};\nconst isInternationalized = (element) => typeof element === 'object' &&\n element !== null &&\n typeof element.i18n === 'string';\nconst isGroup = (layout) => layout.type === 'Group';\nconst isLayout = (uischema) => uischema.elements !== undefined;\nconst isScopable = (obj) => !!obj && typeof obj === 'object';\nconst isScoped = (obj) => isScopable(obj) && typeof obj.scope === 'string';\nconst isLabelable = (obj) => !!obj && typeof obj === 'object';\nconst isLabeled = (obj) => isLabelable(obj) && ['string', 'boolean'].includes(typeof obj.label);\nconst isControlElement = (uiSchema) => uiSchema.type === 'Control';\n\nconst isOrCondition = (condition) => condition.type === 'OR';\nconst isAndCondition = (condition) => condition.type === 'AND';\nconst isLeafCondition = (condition) => condition.type === 'LEAF';\nconst isSchemaCondition = (condition) => has(condition, 'schema');\nconst isValidateFunctionCondition = (condition) => has(condition, 'validate') &&\n typeof condition.validate === 'function';\nconst getConditionScope = (condition, path) => {\n return composeWithUi(condition, path);\n};\nconst evaluateCondition = (data, uischema, condition, path, ajv) => {\n if (isAndCondition(condition)) {\n return condition.conditions.reduce((acc, cur) => acc && evaluateCondition(data, uischema, cur, path, ajv), true);\n }\n else if (isOrCondition(condition)) {\n return condition.conditions.reduce((acc, cur) => acc || evaluateCondition(data, uischema, cur, path, ajv), false);\n }\n else if (isLeafCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n return value === condition.expectedValue;\n }\n else if (isSchemaCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n if (condition.failWhenUndefined && value === undefined) {\n return false;\n }\n return ajv.validate(condition.schema, value);\n }\n else if (isValidateFunctionCondition(condition)) {\n const value = resolveData(data, getConditionScope(condition, path));\n const context = {\n data: value,\n fullData: data,\n path,\n uischemaElement: uischema,\n };\n return condition.validate(context);\n }\n else {\n return true;\n }\n};\nconst isRuleFulfilled = (uischema, data, path, ajv) => {\n const condition = uischema.rule.condition;\n return evaluateCondition(data, uischema, condition, path, ajv);\n};\nconst evalVisibility = (uischema, data, path = undefined, ajv) => {\n const fulfilled = isRuleFulfilled(uischema, data, path, ajv);\n switch (uischema.rule.effect) {\n case RuleEffect.HIDE:\n return !fulfilled;\n case RuleEffect.SHOW:\n return fulfilled;\n default:\n return true;\n }\n};\nconst evalEnablement = (uischema, data, path = undefined, ajv) => {\n const fulfilled = isRuleFulfilled(uischema, data, path, ajv);\n switch (uischema.rule.effect) {\n case RuleEffect.DISABLE:\n return !fulfilled;\n case RuleEffect.ENABLE:\n return fulfilled;\n default:\n return true;\n }\n};\nconst hasShowRule = (uischema) => {\n if (uischema.rule &&\n (uischema.rule.effect === RuleEffect.SHOW ||\n uischema.rule.effect === RuleEffect.HIDE)) {\n return true;\n }\n return false;\n};\nconst hasEnableRule = (uischema) => {\n if (uischema.rule &&\n (uischema.rule.effect === RuleEffect.ENABLE ||\n uischema.rule.effect === RuleEffect.DISABLE)) {\n return true;\n }\n return false;\n};\nconst isVisible = (uischema, data, path = undefined, ajv) => {\n if (uischema.rule) {\n return evalVisibility(uischema, data, path, ajv);\n }\n return true;\n};\nconst isEnabled = (uischema, data, path = undefined, ajv) => {\n if (uischema.rule) {\n return evalEnablement(uischema, data, path, ajv);\n }\n return true;\n};\n\nconst getFirstPrimitiveProp = (schema) => {\n if (schema &&\n typeof schema === 'object' &&\n 'properties' in schema &&\n schema.properties) {\n return find(Object.keys(schema.properties), (propName) => {\n const prop = schema.properties[propName];\n return (prop &&\n typeof prop === 'object' &&\n 'type' in prop &&\n (prop.type === 'string' ||\n prop.type === 'number' ||\n prop.type === 'integer'));\n });\n }\n return undefined;\n};\nconst isOneOfEnumSchema = (schema) => !!schema &&\n Object.prototype.hasOwnProperty.call(schema, 'oneOf') &&\n schema.oneOf &&\n schema.oneOf.every((s) => s.const !== undefined);\nconst isEnumSchema = (schema) => !!schema &&\n typeof schema === 'object' &&\n (Object.prototype.hasOwnProperty.call(schema, 'enum') ||\n Object.prototype.hasOwnProperty.call(schema, 'const'));\n\nconst convertDateToString = (date, format) => {\n const dateString = date.toISOString();\n if (format === 'date-time') {\n return dateString;\n }\n else if (format === 'date') {\n return dateString.split('T')[0];\n }\n else if (format === 'time') {\n return dateString.split('T')[1].split('.')[0];\n }\n return dateString;\n};\nconst convertToValidClassName = (s) => s.replace('#', 'root').replace(new RegExp('/', 'g'), '_');\nconst hasType = (jsonSchema, expected) => {\n return includes(deriveTypes(jsonSchema), expected);\n};\nconst deriveTypes = (jsonSchema) => {\n if (isEmpty(jsonSchema)) {\n return [];\n }\n if (!isEmpty(jsonSchema.type) && typeof jsonSchema.type === 'string') {\n return [jsonSchema.type];\n }\n if (isArray(jsonSchema.type)) {\n return jsonSchema.type;\n }\n if (!isEmpty(jsonSchema.properties) ||\n !isEmpty(jsonSchema.additionalProperties)) {\n return ['object'];\n }\n if (!isEmpty(jsonSchema.items)) {\n return ['array'];\n }\n if (!isEmpty(jsonSchema.enum)) {\n const types = new Set();\n jsonSchema.enum.forEach((enumElement) => {\n if (typeof enumElement === 'string') {\n types.add('string');\n }\n else {\n deriveTypes(enumElement).forEach((type) => types.add(type));\n }\n });\n return Array.from(types);\n }\n if (!isEmpty(jsonSchema.allOf)) {\n const allOfType = find(jsonSchema.allOf, (schema) => deriveTypes(schema).length !== 0);\n if (allOfType) {\n return deriveTypes(allOfType);\n }\n }\n return [];\n};\nconst Resolve = {\n schema: resolveSchema,\n data: resolveData,\n};\nconst fromScoped = (scopable) => toDataPathSegments(scopable.scope).join('.');\nconst Paths = {\n compose: compose,\n fromScoped,\n};\nconst Runtime = {\n isEnabled(uischema, data, ajv) {\n return isEnabled(uischema, data, undefined, ajv);\n },\n isVisible(uischema, data, ajv) {\n return isVisible(uischema, data, undefined, ajv);\n },\n};\n\nconst createAjv = (options) => {\n const ajv = new Ajv({\n allErrors: true,\n verbose: true,\n strict: false,\n addUsedSchema: false,\n ...options,\n });\n addFormats(ajv);\n return ajv;\n};\nconst validate = (validator, data) => {\n if (validator === undefined) {\n return [];\n }\n const valid = validator(data);\n if (valid) {\n return [];\n }\n return validator.errors;\n};\n\nconst defaultDateFormat = 'YYYY-MM-DD';\nconst defaultTimeFormat = 'HH:mm:ss';\nconst defaultDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss.sssZ';\n\nconst getInvalidProperty = (error) => {\n switch (error.keyword) {\n case 'required':\n case 'dependencies':\n return error.params.missingProperty;\n case 'additionalProperties':\n return error.params.additionalProperty;\n default:\n return undefined;\n }\n};\nconst getControlPath = (error) => {\n let controlPath = error.dataPath || error.instancePath || '';\n controlPath = controlPath.replace(/\\//g, '.');\n const invalidProperty = getInvalidProperty(error);\n if (invalidProperty !== undefined && !controlPath.endsWith(invalidProperty)) {\n controlPath = `${controlPath}.${invalidProperty}`;\n }\n controlPath = controlPath.replace(/^./, '');\n controlPath = decode(controlPath);\n return controlPath;\n};\nconst errorsAt = (instancePath, schema, matchPath) => (errors) => {\n const combinatorPaths = filter(errors, (error) => error.keyword === 'oneOf' || error.keyword === 'anyOf').map((error) => getControlPath(error));\n return filter(errors, (error) => {\n if (filteredErrorKeywords.indexOf(error.keyword) !== -1 &&\n !isOneOfEnumSchema(error.parentSchema)) {\n return false;\n }\n const controlPath = getControlPath(error);\n let result = matchPath(controlPath);\n const parentSchema = error.parentSchema;\n if (result &&\n !isObjectSchema(parentSchema) &&\n !isOneOfEnumSchema(parentSchema) &&\n combinatorPaths.findIndex((p) => instancePath.startsWith(p)) !== -1) {\n result = result && isEqual(parentSchema, schema);\n }\n return result;\n });\n};\nconst isObjectSchema = (schema) => {\n return schema?.type === 'object' || !!schema?.properties;\n};\nconst filteredErrorKeywords = [\n 'additionalProperties',\n 'allOf',\n 'anyOf',\n 'oneOf',\n];\nconst formatErrorMessage = (errors) => {\n if (errors === undefined || errors === null) {\n return '';\n }\n return errors.join('\\n');\n};\n\nconst Helpers = {\n createLabelDescriptionFrom,\n convertToValidClassName,\n};\n\nconst createLayout = (layoutType) => ({\n type: layoutType,\n elements: [],\n});\nconst createControlElement = (ref) => ({\n type: 'Control',\n scope: ref,\n});\nconst wrapInLayoutIfNecessary = (uischema, layoutType) => {\n if (!isEmpty(uischema) && !isLayout(uischema)) {\n const verticalLayout = createLayout(layoutType);\n verticalLayout.elements.push(uischema);\n return verticalLayout;\n }\n return uischema;\n};\nconst addLabel = (layout, labelName) => {\n if (!isEmpty(labelName)) {\n const fixedLabel = startCase(labelName);\n if (isGroup(layout)) {\n layout.label = fixedLabel;\n }\n else {\n const label = {\n type: 'Label',\n text: fixedLabel,\n };\n layout.elements.push(label);\n }\n }\n};\nconst isCombinator = (jsonSchema) => {\n return (!isEmpty(jsonSchema) &&\n (!isEmpty(jsonSchema.oneOf) ||\n !isEmpty(jsonSchema.anyOf) ||\n !isEmpty(jsonSchema.allOf)));\n};\nconst generateUISchema = (jsonSchema, schemaElements, currentRef, schemaName, layoutType, rootSchema) => {\n if (!isEmpty(jsonSchema) && jsonSchema.$ref !== undefined) {\n return generateUISchema(resolveSchema(rootSchema, jsonSchema.$ref, rootSchema), schemaElements, currentRef, schemaName, layoutType, rootSchema);\n }\n if (isCombinator(jsonSchema)) {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n const types = deriveTypes(jsonSchema);\n if (types.length === 0) {\n return null;\n }\n if (types.length > 1) {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n if (currentRef === '#' && types[0] === 'object') {\n const layout = createLayout(layoutType);\n schemaElements.push(layout);\n if (jsonSchema.properties && keys(jsonSchema.properties).length > 1) {\n addLabel(layout, schemaName);\n }\n if (!isEmpty(jsonSchema.properties)) {\n const nextRef = currentRef + '/properties';\n Object.keys(jsonSchema.properties).map((propName) => {\n let value = jsonSchema.properties[propName];\n const ref = `${nextRef}/${encode(propName)}`;\n if (value.$ref !== undefined) {\n value = resolveSchema(rootSchema, value.$ref, rootSchema);\n }\n generateUISchema(value, layout.elements, ref, propName, layoutType, rootSchema);\n });\n }\n return layout;\n }\n switch (types[0]) {\n case 'object':\n case 'array':\n case 'string':\n case 'number':\n case 'integer':\n case 'null':\n case 'boolean': {\n const controlObject = createControlElement(currentRef);\n schemaElements.push(controlObject);\n return controlObject;\n }\n default:\n throw new Error('Unknown type: ' + JSON.stringify(jsonSchema));\n }\n};\nconst generateDefaultUISchema = (jsonSchema, layoutType = 'VerticalLayout', prefix = '#', rootSchema = jsonSchema) => wrapInLayoutIfNecessary(generateUISchema(jsonSchema, [], prefix, '', layoutType, rootSchema), layoutType);\n\nconst Generate = {\n jsonSchema: generateJsonSchema,\n uiSchema: generateDefaultUISchema,\n controlElement: createControlElement,\n};\n\nconst INIT = 'jsonforms/INIT';\nconst UPDATE_CORE = 'jsonforms/UPDATE_CORE';\nconst SET_AJV = 'jsonforms/SET_AJV';\nconst UPDATE_DATA = 'jsonforms/UPDATE';\nconst UPDATE_ERRORS = 'jsonforms/UPDATE_ERRORS';\nconst VALIDATE = 'jsonforms/VALIDATE';\nconst ADD_RENDERER = 'jsonforms/ADD_RENDERER';\nconst REMOVE_RENDERER = 'jsonforms/REMOVE_RENDERER';\nconst ADD_CELL = 'jsonforms/ADD_CELL';\nconst REMOVE_CELL = 'jsonforms/REMOVE_CELL';\nconst SET_CONFIG = 'jsonforms/SET_CONFIG';\nconst ADD_UI_SCHEMA = 'jsonforms/ADD_UI_SCHEMA';\nconst REMOVE_UI_SCHEMA = 'jsonforms/REMOVE_UI_SCHEMA';\nconst SET_SCHEMA = 'jsonforms/SET_SCHEMA';\nconst SET_UISCHEMA = 'jsonforms/SET_UISCHEMA';\nconst SET_VALIDATION_MODE = 'jsonforms/SET_VALIDATION_MODE';\nconst SET_LOCALE = 'jsonforms/SET_LOCALE';\nconst SET_TRANSLATOR = 'jsonforms/SET_TRANSLATOR';\nconst UPDATE_I18N = 'jsonforms/UPDATE_I18N';\nconst ADD_DEFAULT_DATA = 'jsonforms/ADD_DEFAULT_DATA';\nconst REMOVE_DEFAULT_DATA = 'jsonforms/REMOVE_DEFAULT_DATA';\nconst isUpdateArrayContext = (context) => {\n if (!('type' in context)) {\n return false;\n }\n if (typeof context.type !== 'string') {\n return false;\n }\n switch (context.type) {\n case 'ADD': {\n return ('values' in context &&\n Array.isArray(context.values) &&\n context.values.length > 0);\n }\n case 'REMOVE': {\n return ('indices' in context &&\n Array.isArray(context.indices) &&\n context.indices.length > 0 &&\n context.indices.every((i) => typeof i === 'number'));\n }\n case 'MOVE': {\n return ('moves' in context &&\n Array.isArray(context.moves) &&\n context.moves.length > 0 &&\n context.moves.every((m) => typeof m === 'object' &&\n m !== null &&\n 'from' in m &&\n 'to' in m &&\n typeof m.from === 'number' &&\n typeof m.to === 'number'));\n }\n default:\n return false;\n }\n};\nconst init = (data, schema = generateJsonSchema(data), uischema, options) => ({\n type: INIT,\n data,\n schema,\n uischema: typeof uischema === 'object' ? uischema : generateDefaultUISchema(schema),\n options,\n});\nconst updateCore = (data, schema, uischema, options) => ({\n type: UPDATE_CORE,\n data,\n schema,\n uischema,\n options,\n});\nconst registerDefaultData = (schemaPath, data) => ({\n type: ADD_DEFAULT_DATA,\n schemaPath,\n data,\n});\nconst unregisterDefaultData = (schemaPath) => ({\n type: REMOVE_DEFAULT_DATA,\n schemaPath,\n});\nconst setAjv = (ajv) => ({\n type: SET_AJV,\n ajv,\n});\nconst update = (path, updater, context) => ({\n type: UPDATE_DATA,\n path,\n updater,\n context,\n});\nconst updateErrors = (errors) => ({\n type: UPDATE_ERRORS,\n errors,\n});\nconst registerRenderer = (tester, renderer) => ({\n type: ADD_RENDERER,\n tester,\n renderer,\n});\nconst registerCell = (tester, cell) => ({\n type: ADD_CELL,\n tester,\n cell,\n});\nconst unregisterCell = (tester, cell) => ({\n type: REMOVE_CELL,\n tester,\n cell,\n});\nconst unregisterRenderer = (tester, renderer) => ({\n type: REMOVE_RENDERER,\n tester,\n renderer,\n});\nconst setConfig = (config) => ({\n type: SET_CONFIG,\n config,\n});\nconst setValidationMode = (validationMode) => ({\n type: SET_VALIDATION_MODE,\n validationMode,\n});\nconst registerUISchema = (tester, uischema) => {\n return {\n type: ADD_UI_SCHEMA,\n tester,\n uischema,\n };\n};\nconst unregisterUISchema = (tester) => {\n return {\n type: REMOVE_UI_SCHEMA,\n tester,\n };\n};\nconst setLocale = (locale) => ({\n type: SET_LOCALE,\n locale,\n});\nconst setSchema = (schema) => ({\n type: SET_SCHEMA,\n schema,\n});\nconst setTranslator = (translator, errorTranslator) => ({\n type: SET_TRANSLATOR,\n translator,\n errorTranslator,\n});\nconst updateI18n = (locale, translator, errorTranslator) => ({\n type: UPDATE_I18N,\n locale,\n translator,\n errorTranslator,\n});\nconst setUISchema = (uischema) => ({\n type: SET_UISCHEMA,\n uischema,\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n INIT: INIT,\n UPDATE_CORE: UPDATE_CORE,\n SET_AJV: SET_AJV,\n UPDATE_DATA: UPDATE_DATA,\n UPDATE_ERRORS: UPDATE_ERRORS,\n VALIDATE: VALIDATE,\n ADD_RENDERER: ADD_RENDERER,\n REMOVE_RENDERER: REMOVE_RENDERER,\n ADD_CELL: ADD_CELL,\n REMOVE_CELL: REMOVE_CELL,\n SET_CONFIG: SET_CONFIG,\n ADD_UI_SCHEMA: ADD_UI_SCHEMA,\n REMOVE_UI_SCHEMA: REMOVE_UI_SCHEMA,\n SET_SCHEMA: SET_SCHEMA,\n SET_UISCHEMA: SET_UISCHEMA,\n SET_VALIDATION_MODE: SET_VALIDATION_MODE,\n SET_LOCALE: SET_LOCALE,\n SET_TRANSLATOR: SET_TRANSLATOR,\n UPDATE_I18N: UPDATE_I18N,\n ADD_DEFAULT_DATA: ADD_DEFAULT_DATA,\n REMOVE_DEFAULT_DATA: REMOVE_DEFAULT_DATA,\n isUpdateArrayContext: isUpdateArrayContext,\n init: init,\n updateCore: updateCore,\n registerDefaultData: registerDefaultData,\n unregisterDefaultData: unregisterDefaultData,\n setAjv: setAjv,\n update: update,\n updateErrors: updateErrors,\n registerRenderer: registerRenderer,\n registerCell: registerCell,\n unregisterCell: unregisterCell,\n unregisterRenderer: unregisterRenderer,\n setConfig: setConfig,\n setValidationMode: setValidationMode,\n registerUISchema: registerUISchema,\n unregisterUISchema: unregisterUISchema,\n setLocale: setLocale,\n setSchema: setSchema,\n setTranslator: setTranslator,\n updateI18n: updateI18n,\n setUISchema: setUISchema\n});\n\nconst cellReducer = (state = [], { type, tester, cell }) => {\n switch (type) {\n case ADD_CELL:\n return state.concat([{ tester, cell }]);\n case REMOVE_CELL:\n return state.filter((t) => t.tester !== tester);\n default:\n return state;\n }\n};\n\nconst configDefault = {\n restrict: false,\n trim: false,\n showUnfocusedDescription: false,\n hideRequiredAsterisk: false,\n};\n\nconst applyDefaultConfiguration = (config = {}) => merge({}, configDefault, config);\nconst configReducer = (state = applyDefaultConfiguration(), action) => {\n switch (action.type) {\n case SET_CONFIG:\n return applyDefaultConfiguration(action.config);\n default:\n return state;\n }\n};\n\nconst initState = {\n data: {},\n schema: {},\n uischema: undefined,\n errors: [],\n validator: undefined,\n ajv: undefined,\n validationMode: 'ValidateAndShow',\n additionalErrors: [],\n};\nconst getValidationMode = (state, action) => {\n if (action && hasValidationModeOption(action.options)) {\n return action.options.validationMode;\n }\n return state.validationMode;\n};\nconst hasValidationModeOption = (option) => {\n if (option) {\n return option.validationMode !== undefined;\n }\n return false;\n};\nconst hasAdditionalErrorsOption = (option) => {\n if (option) {\n return option.additionalErrors !== undefined;\n }\n return false;\n};\nconst getAdditionalErrors = (state, action) => {\n if (action && hasAdditionalErrorsOption(action.options)) {\n return action.options.additionalErrors;\n }\n return state.additionalErrors;\n};\nconst getOrCreateAjv = (state, action) => {\n if (action) {\n if (hasAjvOption(action.options)) {\n return action.options.ajv;\n }\n else if (action.options !== undefined) {\n if (isFunction(action.options.compile)) {\n return action.options;\n }\n }\n }\n return state.ajv ? state.ajv : createAjv();\n};\nconst hasAjvOption = (option) => {\n if (option) {\n return option.ajv !== undefined;\n }\n return false;\n};\nconst coreReducer = (state = initState, action) => {\n switch (action.type) {\n case INIT: {\n const thisAjv = getOrCreateAjv(state, action);\n const validationMode = getValidationMode(state, action);\n const v = validationMode === 'NoValidation'\n ? undefined\n : thisAjv.compile(action.schema);\n const e = validate(v, action.data);\n const additionalErrors = getAdditionalErrors(state, action);\n return {\n ...state,\n data: action.data,\n schema: action.schema,\n uischema: action.uischema,\n additionalErrors,\n errors: e,\n validator: v,\n ajv: thisAjv,\n validationMode,\n };\n }\n case UPDATE_CORE: {\n const thisAjv = getOrCreateAjv(state, action);\n const validationMode = getValidationMode(state, action);\n let validator = state.validator;\n let errors = state.errors;\n if (state.schema !== action.schema ||\n state.validationMode !== validationMode ||\n state.ajv !== thisAjv) {\n validator =\n validationMode === 'NoValidation'\n ? undefined\n : thisAjv.compile(action.schema);\n errors = validate(validator, action.data);\n }\n else if (state.data !== action.data) {\n errors = validate(validator, action.data);\n }\n const additionalErrors = getAdditionalErrors(state, action);\n const stateChanged = state.data !== action.data ||\n state.schema !== action.schema ||\n state.uischema !== action.uischema ||\n state.ajv !== thisAjv ||\n state.errors !== errors ||\n state.validator !== validator ||\n state.validationMode !== validationMode ||\n state.additionalErrors !== additionalErrors;\n return stateChanged\n ? {\n ...state,\n data: action.data,\n schema: action.schema,\n uischema: action.uischema,\n ajv: thisAjv,\n errors: isEqual(errors, state.errors) ? state.errors : errors,\n validator: validator,\n validationMode: validationMode,\n additionalErrors,\n }\n : state;\n }\n case SET_AJV: {\n const currentAjv = action.ajv;\n const validator = state.validationMode === 'NoValidation'\n ? undefined\n : currentAjv.compile(state.schema);\n const errors = validate(validator, state.data);\n return {\n ...state,\n validator,\n errors,\n };\n }\n case SET_SCHEMA: {\n const needsNewValidator = action.schema && state.ajv && state.validationMode !== 'NoValidation';\n const v = needsNewValidator\n ? state.ajv.compile(action.schema)\n : state.validator;\n const errors = validate(v, state.data);\n return {\n ...state,\n validator: v,\n schema: action.schema,\n errors,\n };\n }\n case SET_UISCHEMA: {\n return {\n ...state,\n uischema: action.uischema,\n };\n }\n case UPDATE_DATA: {\n if (action.path === undefined || action.path === null) {\n return state;\n }\n else if (action.path === '') {\n const result = action.updater(cloneDeep(state.data));\n const errors = validate(state.validator, result);\n return {\n ...state,\n data: result,\n errors,\n };\n }\n else {\n const oldData = get(state.data, action.path);\n const newData = action.updater(cloneDeep(oldData));\n let newState;\n if (newData !== undefined) {\n newState = setFp(action.path, newData, state.data === undefined ? {} : state.data);\n }\n else {\n newState = unsetFp(action.path, state.data === undefined ? {} : state.data);\n }\n const errors = validate(state.validator, newState);\n return {\n ...state,\n data: newState,\n errors,\n };\n }\n }\n case UPDATE_ERRORS: {\n return {\n ...state,\n errors: action.errors,\n };\n }\n case SET_VALIDATION_MODE: {\n if (state.validationMode === action.validationMode) {\n return state;\n }\n if (action.validationMode === 'NoValidation') {\n const errors = validate(undefined, state.data);\n return {\n ...state,\n errors,\n validationMode: action.validationMode,\n };\n }\n if (state.validationMode === 'NoValidation') {\n const validator = state.ajv.compile(state.schema);\n const errors = validate(validator, state.data);\n return {\n ...state,\n validator,\n errors,\n validationMode: action.validationMode,\n };\n }\n return {\n ...state,\n validationMode: action.validationMode,\n };\n }\n default:\n return state;\n }\n};\n\nconst defaultDataReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_DEFAULT_DATA:\n return state.concat([\n { schemaPath: action.schemaPath, data: action.data },\n ]);\n case REMOVE_DEFAULT_DATA:\n return state.filter((t) => t.schemaPath !== action.schemaPath);\n default:\n return state;\n }\n};\nconst getDefaultData = (state) => extractDefaultData(get(state, 'jsonforms.defaultData'));\nconst extractDefaultData = (state) => state;\n\nvar ArrayTranslationEnum;\n(function (ArrayTranslationEnum) {\n ArrayTranslationEnum[\"addTooltip\"] = \"addTooltip\";\n ArrayTranslationEnum[\"addAriaLabel\"] = \"addAriaLabel\";\n ArrayTranslationEnum[\"removeTooltip\"] = \"removeTooltip\";\n ArrayTranslationEnum[\"upAriaLabel\"] = \"upAriaLabel\";\n ArrayTranslationEnum[\"downAriaLabel\"] = \"downAriaLabel\";\n ArrayTranslationEnum[\"noSelection\"] = \"noSelection\";\n ArrayTranslationEnum[\"removeAriaLabel\"] = \"removeAriaLabel\";\n ArrayTranslationEnum[\"noDataMessage\"] = \"noDataMessage\";\n ArrayTranslationEnum[\"deleteDialogTitle\"] = \"deleteDialogTitle\";\n ArrayTranslationEnum[\"deleteDialogMessage\"] = \"deleteDialogMessage\";\n ArrayTranslationEnum[\"deleteDialogAccept\"] = \"deleteDialogAccept\";\n ArrayTranslationEnum[\"deleteDialogDecline\"] = \"deleteDialogDecline\";\n ArrayTranslationEnum[\"up\"] = \"up\";\n ArrayTranslationEnum[\"down\"] = \"down\";\n})(ArrayTranslationEnum || (ArrayTranslationEnum = {}));\nconst arrayDefaultTranslations = [\n {\n key: ArrayTranslationEnum.addTooltip,\n default: (input) => (input ? `Add to ${input}` : 'Add'),\n },\n {\n key: ArrayTranslationEnum.addAriaLabel,\n default: (input) => (input ? `Add to ${input} button` : 'Add button'),\n },\n { key: ArrayTranslationEnum.removeTooltip, default: () => 'Delete' },\n { key: ArrayTranslationEnum.removeAriaLabel, default: () => 'Delete button' },\n { key: ArrayTranslationEnum.upAriaLabel, default: () => `Move item up` },\n { key: ArrayTranslationEnum.up, default: () => 'Up' },\n { key: ArrayTranslationEnum.down, default: () => 'Down' },\n { key: ArrayTranslationEnum.downAriaLabel, default: () => `Move item down` },\n { key: ArrayTranslationEnum.noDataMessage, default: () => 'No data' },\n { key: ArrayTranslationEnum.noSelection, default: () => 'No selection' },\n {\n key: ArrayTranslationEnum.deleteDialogTitle,\n default: () => 'Confirm Deletion',\n },\n {\n key: ArrayTranslationEnum.deleteDialogMessage,\n default: () => 'Are you sure you want to delete the selected entry?',\n },\n { key: ArrayTranslationEnum.deleteDialogAccept, default: () => 'Yes' },\n { key: ArrayTranslationEnum.deleteDialogDecline, default: () => 'No' },\n];\n\nvar CombinatorTranslationEnum;\n(function (CombinatorTranslationEnum) {\n CombinatorTranslationEnum[\"clearDialogTitle\"] = \"clearDialogTitle\";\n CombinatorTranslationEnum[\"clearDialogMessage\"] = \"clearDialogMessage\";\n CombinatorTranslationEnum[\"clearDialogAccept\"] = \"clearDialogAccept\";\n CombinatorTranslationEnum[\"clearDialogDecline\"] = \"clearDialogDecline\";\n})(CombinatorTranslationEnum || (CombinatorTranslationEnum = {}));\nconst combinatorDefaultTranslations = [\n {\n key: CombinatorTranslationEnum.clearDialogTitle,\n default: () => 'Clear form?',\n },\n {\n key: CombinatorTranslationEnum.clearDialogMessage,\n default: () => 'Your data will be cleared. Do you want to proceed?',\n },\n { key: CombinatorTranslationEnum.clearDialogAccept, default: () => 'Yes' },\n { key: CombinatorTranslationEnum.clearDialogDecline, default: () => 'No' },\n];\n\nconst getI18nKeyPrefixBySchema = (schema, uischema) => {\n if (isInternationalized(uischema)) {\n return uischema.i18n;\n }\n return schema?.i18n ?? undefined;\n};\nconst transformPathToI18nPrefix = (path) => {\n return (path\n ?.split('.')\n .filter((segment) => !/^\\d+$/.test(segment))\n .join('.') || 'root');\n};\nconst getI18nKeyPrefix = (schema, uischema, path) => {\n return (getI18nKeyPrefixBySchema(schema, uischema) ??\n transformPathToI18nPrefix(path));\n};\nconst getI18nKey = (schema, uischema, path, key) => {\n return `${getI18nKeyPrefix(schema, uischema, path)}.${key}`;\n};\nconst addI18nKeyToPrefix = (i18nKeyPrefix, key) => {\n return `${i18nKeyPrefix}.${key}`;\n};\nconst defaultTranslator = (_id, defaultMessage) => defaultMessage;\nconst defaultErrorTranslator = (error, t, uischema) => {\n const i18nKey = getI18nKey(error.parentSchema, uischema, getControlPath(error), `error.${error.keyword}`);\n const specializedKeywordMessage = t(i18nKey, undefined, { error });\n if (specializedKeywordMessage !== undefined) {\n return specializedKeywordMessage;\n }\n const genericKeywordMessage = t(`error.${error.keyword}`, undefined, {\n error,\n });\n if (genericKeywordMessage !== undefined) {\n return genericKeywordMessage;\n }\n const messageCustomization = t(error.message, undefined, { error });\n if (messageCustomization !== undefined) {\n return messageCustomization;\n }\n if (error.keyword === 'required' &&\n error.message?.startsWith('must have required property')) {\n return t('is a required property', 'is a required property', { error });\n }\n return error.message;\n};\nconst getCombinedErrorMessage = (errors, et, t, schema, uischema, path) => {\n if (errors.length > 0 && t) {\n const customErrorKey = getI18nKey(schema, uischema, path, 'error.custom');\n const specializedErrorMessage = t(customErrorKey, undefined, {\n schema,\n uischema,\n path,\n errors,\n });\n if (specializedErrorMessage !== undefined) {\n return specializedErrorMessage;\n }\n }\n return formatErrorMessage(errors.map((error) => et(error, t, uischema)));\n};\nconst deriveLabelForUISchemaElement = (uischema, t) => {\n if (uischema.label === false) {\n return undefined;\n }\n if ((uischema.label === undefined ||\n uischema.label === null ||\n uischema.label === true) &&\n !isInternationalized(uischema)) {\n return undefined;\n }\n const stringifiedLabel = typeof uischema.label === 'string'\n ? uischema.label\n : JSON.stringify(uischema.label);\n const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema);\n const i18nKey = typeof i18nKeyPrefix === 'string'\n ? `${i18nKeyPrefix}.label`\n : stringifiedLabel;\n return t(i18nKey, stringifiedLabel, { uischema: uischema });\n};\nconst getArrayTranslations = (t, defaultTranslations, i18nKeyPrefix, label) => {\n const translations = {};\n defaultTranslations.forEach((controlElement) => {\n const key = addI18nKeyToPrefix(i18nKeyPrefix, controlElement.key);\n translations[controlElement.key] = t(key, controlElement.default(label));\n });\n return translations;\n};\nconst getCombinatorTranslations = (t, defaultTranslations, i18nKeyPrefix, label) => {\n const translations = {};\n defaultTranslations.forEach((controlElement) => {\n const key = addI18nKeyToPrefix(i18nKeyPrefix, controlElement.key);\n translations[controlElement.key] = t(key, controlElement.default(label));\n });\n return translations;\n};\n\nconst fetchLocale = (state) => {\n if (state === undefined) {\n return undefined;\n }\n return state.locale;\n};\nconst fetchTranslator = (state) => {\n if (state === undefined) {\n return defaultTranslator;\n }\n return state.translate;\n};\nconst fetchErrorTranslator = (state) => {\n if (state === undefined) {\n return defaultErrorTranslator;\n }\n return state.translateError;\n};\nconst getLocale = (state) => fetchLocale(get(state, 'jsonforms.i18n'));\nconst getTranslator = () => (state) => fetchTranslator(get(state, 'jsonforms.i18n'));\nconst getErrorTranslator = () => (state) => fetchErrorTranslator(get(state, 'jsonforms.i18n'));\n\nconst defaultJsonFormsI18nState = {\n locale: 'en',\n translate: defaultTranslator,\n translateError: defaultErrorTranslator,\n};\nconst i18nReducer = (state = defaultJsonFormsI18nState, action) => {\n switch (action.type) {\n case UPDATE_I18N: {\n const locale = action.locale ?? defaultJsonFormsI18nState.locale;\n const translate = action.translator ?? defaultJsonFormsI18nState.translate;\n const translateError = action.errorTranslator ?? defaultJsonFormsI18nState.translateError;\n if (locale !== state.locale ||\n translate !== state.translate ||\n translateError !== state.translateError) {\n return {\n ...state,\n locale,\n translate,\n translateError,\n };\n }\n return state;\n }\n case SET_TRANSLATOR:\n return {\n ...state,\n translate: action.translator ?? defaultTranslator,\n translateError: action.errorTranslator ?? defaultErrorTranslator,\n };\n case SET_LOCALE:\n return {\n ...state,\n locale: action.locale ?? navigator.languages[0],\n };\n default:\n return state;\n }\n};\n\nconst rendererReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_RENDERER:\n return state.concat([\n { tester: action.tester, renderer: action.renderer },\n ]);\n case REMOVE_RENDERER:\n return state.filter((t) => t.tester !== action.tester);\n default:\n return state;\n }\n};\n\nconst NOT_APPLICABLE = -1;\nconst isControl = (uischema) => !isEmpty(uischema) && uischema.scope !== undefined;\nconst schemaMatches = (predicate) => (uischema, schema, context) => {\n if (isEmpty(uischema) || !isControl(uischema)) {\n return false;\n }\n if (isEmpty(schema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n if (isEmpty(schemaPath)) {\n return false;\n }\n let currentDataSchema = schema;\n if (hasType(schema, 'object')) {\n currentDataSchema = resolveSchema(schema, schemaPath, context?.rootSchema);\n }\n if (currentDataSchema === undefined) {\n return false;\n }\n return predicate(currentDataSchema, context?.rootSchema);\n};\nconst schemaSubPathMatches = (subPath, predicate) => (uischema, schema, context) => {\n if (isEmpty(uischema) || !isControl(uischema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n let currentDataSchema = schema;\n if (hasType(schema, 'object')) {\n currentDataSchema = resolveSchema(schema, schemaPath, context?.rootSchema);\n }\n currentDataSchema = get(currentDataSchema, subPath);\n if (currentDataSchema === undefined) {\n return false;\n }\n return predicate(currentDataSchema, context?.rootSchema);\n};\nconst schemaTypeIs = (expectedType) => schemaMatches((schema) => !isEmpty(schema) && hasType(schema, expectedType));\nconst formatIs = (expectedFormat) => schemaMatches((schema) => !isEmpty(schema) &&\n schema.format === expectedFormat &&\n hasType(schema, 'string'));\nconst uiTypeIs = (expected) => (uischema) => !isEmpty(uischema) && uischema.type === expected;\nconst optionIs = (optionName, optionValue) => (uischema) => {\n if (isEmpty(uischema)) {\n return false;\n }\n const options = uischema.options;\n return !isEmpty(options) && options[optionName] === optionValue;\n};\nconst hasOption = (optionName) => (uischema) => {\n if (isEmpty(uischema)) {\n return false;\n }\n const options = uischema.options;\n return !isEmpty(options) && !isUndefined(options[optionName]);\n};\nconst scopeEndsWith = (expected) => (uischema) => {\n if (isEmpty(expected) || !isControl(uischema)) {\n return false;\n }\n return endsWith(uischema.scope, expected);\n};\nconst scopeEndIs = (expected) => (uischema) => {\n if (isEmpty(expected) || !isControl(uischema)) {\n return false;\n }\n const schemaPath = uischema.scope;\n return !isEmpty(schemaPath) && last(schemaPath.split('/')) === expected;\n};\nconst and = (...testers) => (uischema, schema, context) => testers.reduce((acc, tester) => acc && tester(uischema, schema, context), true);\nconst or = (...testers) => (uischema, schema, context) => testers.reduce((acc, tester) => acc || tester(uischema, schema, context), false);\nconst rankWith = (rank, tester) => (uischema, schema, context) => {\n if (tester(uischema, schema, context)) {\n return rank;\n }\n return NOT_APPLICABLE;\n};\nconst withIncreasedRank = (by, rankedTester) => (uischema, schema, context) => {\n const rank = rankedTester(uischema, schema, context);\n if (rank === NOT_APPLICABLE) {\n return NOT_APPLICABLE;\n }\n return rank + by;\n};\nconst isBooleanControl = and(uiTypeIs('Control'), schemaTypeIs('boolean'));\nconst isObjectControl = and(uiTypeIs('Control'), schemaTypeIs('object'));\nconst isAllOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'allOf')));\nconst isAnyOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'anyOf')));\nconst isOneOfControl = and(uiTypeIs('Control'), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'oneOf')));\nconst isEnumControl = and(uiTypeIs('Control'), schemaMatches((schema) => isEnumSchema(schema)));\nconst isOneOfEnumControl = and(uiTypeIs('Control'), schemaMatches((schema) => isOneOfEnumSchema(schema)));\nconst isIntegerControl = and(uiTypeIs('Control'), schemaTypeIs('integer'));\nconst isNumberControl = and(uiTypeIs('Control'), schemaTypeIs('number'));\nconst isStringControl = and(uiTypeIs('Control'), schemaTypeIs('string'));\nconst isMultiLineControl = and(uiTypeIs('Control'), optionIs('multi', true));\nconst isDateControl = and(uiTypeIs('Control'), or(formatIs('date'), optionIs('format', 'date')));\nconst isTimeControl = and(uiTypeIs('Control'), or(formatIs('time'), optionIs('format', 'time')));\nconst isDateTimeControl = and(uiTypeIs('Control'), or(formatIs('date-time'), optionIs('format', 'date-time')));\nconst isObjectArray = and(schemaMatches((schema, rootSchema) => hasType(schema, 'array') &&\n !Array.isArray(resolveSchema(schema, 'items', rootSchema))\n), schemaSubPathMatches('items', (schema, rootSchema) => {\n const resolvedSchema = schema.$ref\n ? resolveSchema(rootSchema, schema.$ref, rootSchema)\n : schema;\n return hasType(resolvedSchema, 'object');\n}));\nconst isObjectArrayControl = and(uiTypeIs('Control'), isObjectArray);\nconst traverse = (any, pred, rootSchema) => {\n if (isArray(any)) {\n return reduce(any, (acc, el) => acc || traverse(el, pred, rootSchema), false);\n }\n if (pred(any)) {\n return true;\n }\n if (any.$ref) {\n const toTraverse = resolveSchema(rootSchema, any.$ref, rootSchema);\n if (toTraverse && !toTraverse.$ref) {\n return traverse(toTraverse, pred, rootSchema);\n }\n }\n if (any.items) {\n return traverse(any.items, pred, rootSchema);\n }\n if (any.properties) {\n return reduce(toPairs(any.properties), (acc, [_key, val]) => acc || traverse(val, pred, rootSchema), false);\n }\n return false;\n};\nconst isObjectArrayWithNesting = (uischema, schema, context) => {\n if (!uiTypeIs('Control')(uischema, schema, context)) {\n return false;\n }\n const schemaPath = uischema.scope;\n const resolvedSchema = resolveSchema(schema, schemaPath, context?.rootSchema ?? schema);\n let objectDepth = 0;\n if (resolvedSchema !== undefined && resolvedSchema.items !== undefined) {\n if (traverse(resolvedSchema.items, (val) => {\n if (val === schema) {\n return false;\n }\n if (val.$ref !== undefined) {\n return false;\n }\n if (val.anyOf || val.allOf) {\n return true;\n }\n if (val.oneOf && !isOneOfEnumSchema(val)) {\n return true;\n }\n if (hasType(val, 'object')) {\n objectDepth++;\n if (objectDepth === 2) {\n return true;\n }\n }\n if (hasType(val, 'array')) {\n return true;\n }\n return false;\n }, context?.rootSchema)) {\n return true;\n }\n if (uischema.options && uischema.options.detail) {\n if (typeof uischema.options.detail === 'string') {\n return uischema.options.detail.toUpperCase() !== 'DEFAULT';\n }\n else if (typeof uischema.options.detail === 'object' &&\n uischema.options.detail.type) {\n return true;\n }\n }\n }\n return false;\n};\nconst isArrayObjectControl = isObjectArrayControl;\nconst isPrimitiveArrayControl = and(uiTypeIs('Control'), schemaMatches((schema, rootSchema) => deriveTypes(schema).length !== 0 &&\n !Array.isArray(resolveSchema(schema, 'items', rootSchema))\n), schemaSubPathMatches('items', (schema, rootSchema) => {\n const resolvedSchema = schema.$ref\n ? resolveSchema(rootSchema, schema.$ref, rootSchema)\n : schema;\n const types = deriveTypes(resolvedSchema);\n return (types.length === 1 &&\n includes(['integer', 'number', 'boolean', 'string'], types[0]));\n}));\nconst isRangeControl = and(uiTypeIs('Control'), or(schemaTypeIs('number'), schemaTypeIs('integer')), schemaMatches((schema) => Object.prototype.hasOwnProperty.call(schema, 'maximum') &&\n Object.prototype.hasOwnProperty.call(schema, 'minimum') &&\n Object.prototype.hasOwnProperty.call(schema, 'default')), optionIs('slider', true));\nconst isNumberFormatControl = and(uiTypeIs('Control'), schemaTypeIs('integer'), optionIs('format', true));\nconst isCategorization = (category) => category.type === 'Categorization';\nconst isCategory = (uischema) => uischema.type === 'Category';\nconst hasCategory = (categorization) => {\n if (isEmpty(categorization.elements)) {\n return false;\n }\n return categorization.elements\n .map((elem) => isCategorization(elem) ? hasCategory(elem) : isCategory(elem))\n .reduce((prev, curr) => prev && curr, true);\n};\nconst categorizationHasCategory = (uischema) => hasCategory(uischema);\nconst not = (tester) => (uischema, schema, context) => !tester(uischema, schema, context);\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n NOT_APPLICABLE: NOT_APPLICABLE,\n isControl: isControl,\n schemaMatches: schemaMatches,\n schemaSubPathMatches: schemaSubPathMatches,\n schemaTypeIs: schemaTypeIs,\n formatIs: formatIs,\n uiTypeIs: uiTypeIs,\n optionIs: optionIs,\n hasOption: hasOption,\n scopeEndsWith: scopeEndsWith,\n scopeEndIs: scopeEndIs,\n and: and,\n or: or,\n rankWith: rankWith,\n withIncreasedRank: withIncreasedRank,\n isBooleanControl: isBooleanControl,\n isObjectControl: isObjectControl,\n isAllOfControl: isAllOfControl,\n isAnyOfControl: isAnyOfControl,\n isOneOfControl: isOneOfControl,\n isEnumControl: isEnumControl,\n isOneOfEnumControl: isOneOfEnumControl,\n isIntegerControl: isIntegerControl,\n isNumberControl: isNumberControl,\n isStringControl: isStringControl,\n isMultiLineControl: isMultiLineControl,\n isDateControl: isDateControl,\n isTimeControl: isTimeControl,\n isDateTimeControl: isDateTimeControl,\n isObjectArray: isObjectArray,\n isObjectArrayControl: isObjectArrayControl,\n isObjectArrayWithNesting: isObjectArrayWithNesting,\n isArrayObjectControl: isArrayObjectControl,\n isPrimitiveArrayControl: isPrimitiveArrayControl,\n isRangeControl: isRangeControl,\n isNumberFormatControl: isNumberFormatControl,\n isCategorization: isCategorization,\n isCategory: isCategory,\n hasCategory: hasCategory,\n categorizationHasCategory: categorizationHasCategory,\n not: not\n});\n\nconst uischemaRegistryReducer = (state = [], action) => {\n switch (action.type) {\n case ADD_UI_SCHEMA:\n return state\n .slice()\n .concat({ tester: action.tester, uischema: action.uischema });\n case REMOVE_UI_SCHEMA: {\n const copy = state.slice();\n remove(copy, (entry) => entry.tester === action.tester);\n return copy;\n }\n default:\n return state;\n }\n};\nconst findMatchingUISchema = (state) => (jsonSchema, schemaPath, path) => {\n const match = maxBy(state, (entry) => entry.tester(jsonSchema, schemaPath, path));\n if (match !== undefined &&\n match.tester(jsonSchema, schemaPath, path) !== NOT_APPLICABLE) {\n return match.uischema;\n }\n return undefined;\n};\n\nconst jsonFormsReducerConfig = {\n core: coreReducer,\n renderers: rendererReducer,\n cells: cellReducer,\n config: configReducer,\n uischemas: uischemaRegistryReducer,\n defaultData: defaultDataReducer,\n i18n: i18nReducer,\n};\nconst findUISchema = (uischemas, schema, schemaPath, path, fallback = 'VerticalLayout', control, rootSchema) => {\n if (control && control.options && control.options.detail) {\n if (typeof control.options.detail === 'string') {\n if (control.options.detail.toUpperCase() === 'GENERATE') {\n if (typeof fallback === 'function') {\n return fallback();\n }\n return Generate.uiSchema(schema, fallback, undefined, rootSchema);\n }\n }\n else if (typeof control.options.detail === 'object') {\n if (control.options.detail.type &&\n typeof control.options.detail.type === 'string') {\n return control.options.detail;\n }\n }\n }\n const uiSchema = findMatchingUISchema(uischemas)(schema, schemaPath, path);\n if (uiSchema === undefined) {\n if (typeof fallback === 'function') {\n return fallback();\n }\n return Generate.uiSchema(schema, fallback, '#', rootSchema);\n }\n return uiSchema;\n};\n\nconst defaultMiddleware = (state, action, defaultReducer) => defaultReducer(state, action);\n\nconst getErrorsAt = (instancePath, schema, matchPath) => (state) => {\n const errors = state.errors ?? [];\n const additionalErrors = state.additionalErrors ?? [];\n return errorsAt(instancePath, schema, matchPath)(state.validationMode === 'ValidateAndHide'\n ? additionalErrors\n : [...errors, ...additionalErrors]);\n};\nconst errorAt = (instancePath, schema) => getErrorsAt(instancePath, schema, (path) => path === instancePath);\nconst subErrorsAt = (instancePath, schema) => getErrorsAt(instancePath, schema, (path) => path.startsWith(instancePath + '.'));\nconst getErrorAt = (instancePath, schema) => (state) => {\n return errorAt(instancePath, schema)(state.jsonforms.core);\n};\nconst getSubErrorsAt = (instancePath, schema) => (state) => subErrorsAt(instancePath, schema)(state.jsonforms.core);\nconst getData = (state) => extractData(get(state, 'jsonforms.core'));\nconst getSchema = (state) => extractSchema(get(state, 'jsonforms.core'));\nconst getUiSchema = (state) => extractUiSchema(get(state, 'jsonforms.core'));\nconst getAjv = (state) => extractAjv(get(state, 'jsonforms.core'));\nconst getRenderers = (state) => get(state, 'jsonforms.renderers');\nconst getCells = (state) => get(state, 'jsonforms.cells');\nconst getUISchemas = (state) => get(state, 'jsonforms.uischemas');\nconst extractData = (state) => get(state, 'data');\nconst extractSchema = (state) => get(state, 'schema');\nconst extractUiSchema = (state) => get(state, 'uischema');\nconst extractAjv = (state) => get(state, 'ajv');\nconst getConfig = (state) => state.jsonforms.config;\n\nconst isInherentlyEnabled = (state, ownProps, uischema, schema, rootData, config) => {\n if (state?.jsonforms?.readonly) {\n return false;\n }\n if (uischema && hasEnableRule(uischema)) {\n return isEnabled(uischema, rootData, ownProps?.path, getAjv(state));\n }\n if (typeof uischema?.options?.readonly === 'boolean') {\n return !uischema.options.readonly;\n }\n if (typeof uischema?.options?.readOnly === 'boolean') {\n return !uischema.options.readOnly;\n }\n if (typeof config?.readonly === 'boolean') {\n return !config.readonly;\n }\n if (typeof config?.readOnly === 'boolean') {\n return !config.readOnly;\n }\n if (schema?.readOnly === true) {\n return false;\n }\n if (typeof ownProps?.enabled === 'boolean') {\n return ownProps.enabled;\n }\n return true;\n};\n\nconst move = (array, index, delta) => {\n const newIndex = index + delta;\n if (newIndex < 0 || newIndex >= array.length) {\n return;\n }\n const indexes = [index, newIndex].sort((a, b) => a - b);\n array.splice(indexes[0], 2, array[indexes[1]], array[indexes[0]]);\n};\nconst moveUp = (array, toMove) => {\n move(array, toMove, -1);\n};\nconst moveDown = (array, toMove) => {\n move(array, toMove, 1);\n};\nconst isRequired = (schema, schemaPath, rootSchema) => {\n const pathSegments = schemaPath.split('/');\n const lastSegment = decode(pathSegments[pathSegments.length - 1]);\n const nextHigherSchemaSegments = pathSegments.slice(0, pathSegments.length - 2);\n const nextHigherSchemaPath = nextHigherSchemaSegments.join('/');\n const nextHigherSchema = Resolve.schema(schema, nextHigherSchemaPath, rootSchema);\n return (nextHigherSchema !== undefined &&\n nextHigherSchema.required !== undefined &&\n nextHigherSchema.required.indexOf(lastSegment) !== -1);\n};\nconst computeLabel = (label, required, hideRequiredAsterisk) => {\n return `${label ?? ''}${required && !hideRequiredAsterisk ? '*' : ''}`;\n};\nconst showAsRequired = (required, hideRequiredAsterisk) => {\n return required && !hideRequiredAsterisk;\n};\nconst createDefaultValue = (schema, rootSchema) => {\n const defaultValue = doCreateDefaultValue(schema, rootSchema);\n return defaultValue === undefined ? {} : defaultValue;\n};\nconst doCreateDefaultValue = (schema, rootSchema) => {\n const resolvedSchema = typeof schema.$ref === 'string'\n ? Resolve.schema(rootSchema, schema.$ref, rootSchema)\n : schema;\n if (resolvedSchema.default !== undefined) {\n return extractDefaults(resolvedSchema, rootSchema);\n }\n if (hasType(resolvedSchema, 'string')) {\n if (resolvedSchema.format === 'date-time' ||\n resolvedSchema.format === 'date' ||\n resolvedSchema.format === 'time') {\n return convertDateToString(new Date(), resolvedSchema.format);\n }\n return '';\n }\n if (hasType(resolvedSchema, 'integer') || hasType(resolvedSchema, 'number')) {\n return 0;\n }\n if (hasType(resolvedSchema, 'boolean')) {\n return false;\n }\n if (hasType(resolvedSchema, 'array')) {\n return [];\n }\n if (hasType(resolvedSchema, 'object')) {\n return extractDefaults(resolvedSchema, rootSchema);\n }\n if (hasType(resolvedSchema, 'null')) {\n return null;\n }\n const combinators = ['oneOf', 'anyOf', 'allOf'];\n for (const combinator of combinators) {\n if (schema[combinator] && Array.isArray(schema[combinator])) {\n const combinatorDefault = createDefaultValueForCombinatorSchema(schema[combinator], rootSchema);\n if (combinatorDefault !== undefined) {\n return combinatorDefault;\n }\n }\n }\n return undefined;\n};\nconst createDefaultValueForCombinatorSchema = (combinatorSchemas, rootSchema) => {\n if (combinatorSchemas.length > 0) {\n for (const combinatorSchema of combinatorSchemas) {\n const result = doCreateDefaultValue(combinatorSchema, rootSchema);\n if (result !== undefined) {\n return result;\n }\n }\n }\n return undefined;\n};\nconst extractDefaults = (schema, rootSchema) => {\n if (hasType(schema, 'object') && schema.default === undefined) {\n const result = {};\n for (const key in schema.properties) {\n const property = schema.properties[key];\n const resolvedProperty = property.$ref\n ? Resolve.schema(rootSchema, property.$ref, rootSchema)\n : property;\n if (resolvedProperty && resolvedProperty.default !== undefined) {\n result[key] = cloneDeep(resolvedProperty.default);\n }\n }\n if (schema.allOf && Array.isArray(schema.allOf)) {\n schema.allOf.forEach((allOfSchema) => {\n if (allOfSchema && allOfSchema.properties) {\n for (const key in allOfSchema.properties) {\n const property = allOfSchema.properties[key];\n const resolvedProperty = property.$ref\n ? Resolve.schema(rootSchema, property.$ref, rootSchema)\n : property;\n if (resolvedProperty && resolvedProperty.default !== undefined) {\n result[key] = cloneDeep(resolvedProperty.default);\n }\n }\n }\n });\n }\n return result;\n }\n return cloneDeep(schema.default);\n};\nconst isDescriptionHidden = (visible, description, isFocused, showUnfocusedDescription) => {\n return (description === undefined ||\n (description !== undefined && !visible) ||\n (!showUnfocusedDescription && !isFocused));\n};\nconst enumToEnumOptionMapper = (e, t, i18nKey) => {\n let label = typeof e === 'string' ? e : JSON.stringify(e);\n if (t) {\n if (i18nKey) {\n label = t(`${i18nKey}.${label}`, label);\n }\n else {\n label = t(label, label);\n }\n }\n return { label, value: e };\n};\nconst oneOfToEnumOptionMapper = (e, t, fallbackI18nKey) => {\n let label = e.title ??\n (typeof e.const === 'string' ? e.const : JSON.stringify(e.const));\n if (t) {\n if (e.i18n) {\n label = t(e.i18n, label);\n }\n else if (fallbackI18nKey) {\n label = t(`${fallbackI18nKey}.${label}`, label);\n }\n else {\n label = t(label, label);\n }\n }\n return {\n label,\n value: e.const,\n };\n};\nconst mapStateToControlProps = (state, ownProps) => {\n const { uischema } = ownProps;\n const rootData = getData(state);\n const path = composeWithUi(uischema, ownProps.path);\n const visible = ownProps.visible === undefined || hasShowRule(uischema)\n ? isVisible(uischema, rootData, ownProps.path, getAjv(state))\n : ownProps.visible;\n const controlElement = uischema;\n const id = ownProps.id;\n const rootSchema = getSchema(state);\n const required = controlElement.scope !== undefined &&\n isRequired(ownProps.schema, controlElement.scope, rootSchema);\n const resolvedSchema = Resolve.schema(ownProps.schema || rootSchema, controlElement.scope, rootSchema);\n const errors = getErrorAt(path, resolvedSchema)(state);\n const description = resolvedSchema !== undefined ? resolvedSchema.description : '';\n const data = Resolve.data(rootData, path);\n const labelDesc = createLabelDescriptionFrom(uischema, resolvedSchema);\n const label = labelDesc.show ? labelDesc.text : '';\n const config = getConfig(state);\n const enabled = isInherentlyEnabled(state, ownProps, uischema, resolvedSchema || rootSchema, rootData, config);\n const schema = resolvedSchema ?? rootSchema;\n const t = getTranslator()(state);\n const te = getErrorTranslator()(state);\n const i18nKeyPrefix = getI18nKeyPrefix(schema, uischema, path);\n const i18nLabel = t(getI18nKey(schema, uischema, path, 'label'), label, {\n schema,\n uischema,\n path,\n errors,\n });\n const i18nDescription = t(getI18nKey(schema, uischema, path, 'description'), description, { schema, uischema, path, errors });\n const i18nErrorMessage = getCombinedErrorMessage(errors, te, t, schema, uischema, path);\n return {\n data,\n description: i18nDescription,\n errors: i18nErrorMessage,\n label: i18nLabel,\n visible,\n enabled,\n id,\n path,\n required,\n uischema,\n schema,\n config: getConfig(state),\n cells: ownProps.cells || state.jsonforms.cells,\n rootSchema,\n i18nKeyPrefix,\n };\n};\nconst mapDispatchToControlProps = (dispatch) => ({\n handleChange(path, value) {\n dispatch(update(path, () => value));\n },\n});\nconst mapStateToEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.enum?.map((e) => enumToEnumOptionMapper(e, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path))) ||\n (props.schema.const && [\n enumToEnumOptionMapper(props.schema.const, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)),\n ]);\n return {\n ...props,\n options,\n };\n};\nconst mapStateToOneOfEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.oneOf?.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapStateToMultiEnumControlProps = (state, ownProps) => {\n const props = mapStateToControlProps(state, ownProps);\n let items = props.schema.items;\n items =\n items && items.$ref\n ? resolveSchema(props.rootSchema, items.$ref, props.rootSchema)\n : items;\n const options = ownProps.options ||\n (items?.oneOf &&\n items.oneOf.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, state.jsonforms.i18n?.translate, getI18nKeyPrefix(props.schema, props.uischema, props.path)))) ||\n items?.enum?.map((e) => enumToEnumOptionMapper(e, state.jsonforms.i18n?.translate, getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapStateToMasterListItemProps = (state, ownProps) => {\n const { schema, path, uischema, childLabelProp, index } = ownProps;\n const childPath = compose(path, `${index}`);\n const childLabel = computeChildLabel(getData(state), childPath, childLabelProp, schema, getSchema(state), state.jsonforms.i18n.translate, uischema);\n return {\n ...ownProps,\n childLabel,\n };\n};\nconst mapStateToControlWithDetailProps = (state, ownProps) => {\n const { ...props } = mapStateToControlProps(state, ownProps);\n return {\n ...props,\n uischemas: state.jsonforms.uischemas,\n };\n};\nconst mapStateToArrayControlProps = (state, ownProps) => {\n const { path, schema, uischema, label, ...props } = mapStateToControlWithDetailProps(state, ownProps);\n const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);\n const childErrors = getSubErrorsAt(path, resolvedSchema)(state);\n return {\n ...props,\n label,\n path,\n uischema,\n schema: resolvedSchema,\n arraySchema: schema,\n childErrors,\n renderers: ownProps.renderers || getRenderers(state),\n cells: ownProps.cells || getCells(state),\n };\n};\nconst mapDispatchToArrayControlProps = (dispatch) => ({\n addItem: (path, value) => () => {\n dispatch(update(path, (array) => {\n if (array === undefined || array === null) {\n return [value];\n }\n array.push(value);\n return array;\n }, { type: 'ADD', values: [value] }));\n },\n removeItems: (path, toDelete) => () => {\n dispatch(update(path, (array) => {\n toDelete\n .sort((a, b) => a - b)\n .reverse()\n .forEach((s) => array.splice(s, 1));\n return array;\n }, { type: 'REMOVE', indices: toDelete }));\n },\n moveUp: (path, toMove) => () => {\n dispatch(update(path, (array) => {\n moveUp(array, toMove);\n return array;\n }, {\n type: 'MOVE',\n moves: [{ from: toMove, to: toMove - 1 }],\n }));\n },\n moveDown: (path, toMove) => () => {\n dispatch(update(path, (array) => {\n moveDown(array, toMove);\n return array;\n }, {\n type: 'MOVE',\n moves: [{ from: toMove, to: toMove + 1 }],\n }));\n },\n});\nconst mapDispatchToMultiEnumProps = (dispatch) => ({\n addItem: (path, value) => {\n dispatch(update(path, (data) => {\n if (data === undefined || data === null) {\n return [value];\n }\n data.push(value);\n return data;\n }));\n },\n removeItem: (path, toDelete) => {\n dispatch(update(path, (data) => {\n const indexInData = data.indexOf(toDelete);\n data.splice(indexInData, 1);\n return data;\n }));\n },\n});\nconst layoutDefaultProps = {\n visible: true,\n enabled: true,\n path: '',\n direction: 'column',\n};\nconst getDirection = (uischema) => {\n if (uischema.type === 'HorizontalLayout') {\n return 'row';\n }\n if (uischema.type === 'VerticalLayout') {\n return 'column';\n }\n return layoutDefaultProps.direction;\n};\nconst mapStateToLayoutProps = (state, ownProps) => {\n const rootData = getData(state);\n const { uischema } = ownProps;\n const visible = ownProps.visible === undefined || hasShowRule(uischema)\n ? isVisible(ownProps.uischema, rootData, ownProps.path, getAjv(state))\n : ownProps.visible;\n const data = Resolve.data(rootData, ownProps.path);\n const config = getConfig(state);\n const enabled = isInherentlyEnabled(state, ownProps, uischema, undefined,\n rootData, config);\n const t = getTranslator()(state);\n const label = isLabelable(uischema)\n ? deriveLabelForUISchemaElement(uischema, t)\n : undefined;\n return {\n ...layoutDefaultProps,\n renderers: ownProps.renderers || getRenderers(state),\n cells: ownProps.cells || getCells(state),\n visible,\n enabled,\n path: ownProps.path,\n data,\n uischema: ownProps.uischema,\n schema: ownProps.schema,\n direction: ownProps.direction ?? getDirection(uischema),\n config,\n label,\n };\n};\nconst mapStateToJsonFormsRendererProps = (state, ownProps) => {\n return {\n renderers: ownProps.renderers || get(state.jsonforms, 'renderers'),\n cells: ownProps.cells || get(state.jsonforms, 'cells'),\n schema: ownProps.schema || getSchema(state),\n rootSchema: getSchema(state),\n uischema: ownProps.uischema || getUiSchema(state),\n path: ownProps.path,\n enabled: ownProps.enabled,\n config: getConfig(state),\n };\n};\nconst controlDefaultProps = {\n ...layoutDefaultProps,\n errors: [],\n};\nconst mapStateToCombinatorRendererProps = (state, ownProps, keyword) => {\n const { data, schema, rootSchema, i18nKeyPrefix, label, ...props } = mapStateToControlProps(state, ownProps);\n const ajv = state.jsonforms.core.ajv;\n const structuralKeywords = [\n 'required',\n 'additionalProperties',\n 'type',\n 'enum',\n 'const',\n ];\n const dataIsValid = (errors) => {\n return (!errors ||\n errors.length === 0 ||\n !errors.find((e) => structuralKeywords.indexOf(e.keyword) !== -1));\n };\n let indexOfFittingSchema;\n for (let i = 0; i < schema[keyword]?.length; i++) {\n try {\n let _schema = schema[keyword][i];\n if (_schema.$ref) {\n _schema = Resolve.schema(rootSchema, _schema.$ref, rootSchema);\n }\n const valFn = ajv.compile(_schema);\n valFn(data);\n if (dataIsValid(valFn.errors)) {\n indexOfFittingSchema = i;\n break;\n }\n }\n catch (error) {\n console.debug(\"Combinator subschema is not self contained, can't hand it over to AJV\");\n }\n }\n return {\n data,\n schema,\n rootSchema,\n ...props,\n i18nKeyPrefix,\n label,\n indexOfFittingSchema,\n uischemas: getUISchemas(state),\n };\n};\nconst mapStateToAllOfProps = (state, ownProps) => mapStateToCombinatorRendererProps(state, ownProps, 'allOf');\nconst mapStateToAnyOfProps = (state, ownProps) => {\n return mapStateToCombinatorRendererProps(state, ownProps, 'anyOf');\n};\nconst mapStateToOneOfProps = (state, ownProps) => {\n return mapStateToCombinatorRendererProps(state, ownProps, 'oneOf');\n};\nconst mapStateToArrayLayoutProps = (state, ownProps) => {\n const { path, schema, uischema, errors, label, ...props } = mapStateToControlWithDetailProps(state, ownProps);\n const resolvedSchema = Resolve.schema(schema, 'items', props.rootSchema);\n const t = getTranslator()(state);\n const childErrors = getCombinedErrorMessage(getSubErrorsAt(path, resolvedSchema)(state), getErrorTranslator()(state), t, undefined, undefined, undefined);\n const allErrors = errors +\n (errors.length > 0 && childErrors.length > 0 ? '\\n' : '') +\n childErrors;\n return {\n ...props,\n label,\n path,\n uischema,\n schema: resolvedSchema,\n arraySchema: schema,\n data: props.data ? props.data.length : 0,\n errors: allErrors,\n minItems: schema.minItems,\n };\n};\nconst mapStateToLabelProps = (state, props) => {\n const { uischema } = props;\n const visible = props.visible === undefined || hasShowRule(uischema)\n ? isVisible(props.uischema, getData(state), props.path, getAjv(state))\n : props.visible;\n const text = uischema.text;\n const t = getTranslator()(state);\n const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema);\n const i18nKey = i18nKeyPrefix ? `${i18nKeyPrefix}.text` : text ?? '';\n const i18nText = t(i18nKey, text, { uischema });\n return {\n text: i18nText,\n visible,\n config: getConfig(state),\n renderers: props.renderers || getRenderers(state),\n cells: props.cells || getCells(state),\n uischema,\n };\n};\nconst computeChildLabel = (data, childPath, childLabelProp, schema, rootSchema, translateFct, uiSchema) => {\n const childData = Resolve.data(data, childPath);\n if (!childLabelProp) {\n childLabelProp = getFirstPrimitiveProp(schema);\n }\n if (!childLabelProp) {\n return '';\n }\n const currentValue = get(childData, childLabelProp);\n if (currentValue === undefined) {\n return '';\n }\n const childSchema = Resolve.schema(schema, '#' + getPropPath(childLabelProp), rootSchema);\n let enumOption = undefined;\n if (isEnumSchema(childSchema)) {\n enumOption = enumToEnumOptionMapper(currentValue, translateFct, getI18nKeyPrefix(childSchema, findUiControl(uiSchema, childLabelProp), childPath + '.' + childLabelProp));\n }\n else if (isOneOfEnumSchema(childSchema)) {\n const oneOfArray = childSchema.oneOf;\n const oneOfSchema = oneOfArray.find((e) => isEqual(e.const, currentValue));\n if (oneOfSchema) {\n enumOption = oneOfToEnumOptionMapper(oneOfSchema, translateFct, getI18nKeyPrefix(oneOfSchema, undefined, childPath + '.' + childLabelProp));\n }\n }\n return enumOption ? enumOption.label : currentValue;\n};\n\nconst mapStateToCellProps = (state, ownProps) => {\n const { id, schema, path, uischema, renderers, cells } = ownProps;\n const rootData = getData(state);\n const visible = ownProps.visible !== undefined\n ? ownProps.visible\n : isVisible(uischema, rootData, undefined, getAjv(state));\n const rootSchema = getSchema(state);\n const config = getConfig(state);\n let enabled;\n if (state.jsonforms.readonly === true) {\n enabled = false;\n }\n else if (typeof ownProps.enabled === 'boolean') {\n enabled = ownProps.enabled;\n }\n else {\n enabled = isInherentlyEnabled(state, ownProps, uischema, schema || rootSchema, rootData, config);\n }\n const t = getTranslator()(state);\n const te = getErrorTranslator()(state);\n const errors = getCombinedErrorMessage(getErrorAt(path, schema)(state), te, t, schema, uischema, path);\n const isValid = isEmpty(errors);\n return {\n data: Resolve.data(rootData, path),\n visible,\n enabled,\n id,\n path,\n errors,\n isValid,\n schema,\n uischema,\n config: getConfig(state),\n rootSchema,\n renderers,\n cells,\n };\n};\nconst mapStateToDispatchCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const { renderers: _renderers, cells, ...otherOwnProps } = ownProps;\n return {\n ...props,\n ...otherOwnProps,\n cells: cells || state.jsonforms.cells || [],\n };\n};\nconst defaultMapStateToEnumCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.enum?.map((e) => enumToEnumOptionMapper(e, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path))) ||\n (props.schema.const && [\n enumToEnumOptionMapper(props.schema.const, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)),\n ]);\n return {\n ...props,\n options,\n };\n};\nconst mapStateToOneOfEnumCellProps = (state, ownProps) => {\n const props = mapStateToCellProps(state, ownProps);\n const options = ownProps.options ||\n props.schema.oneOf?.map((oneOfSubSchema) => oneOfToEnumOptionMapper(oneOfSubSchema, getTranslator()(state), getI18nKeyPrefix(props.schema, props.uischema, props.path)));\n return {\n ...props,\n options,\n };\n};\nconst mapDispatchToCellProps = mapDispatchToControlProps;\nconst defaultMapDispatchToControlProps =\n(dispatch, ownProps) => {\n const { handleChange } = mapDispatchToCellProps(dispatch);\n return {\n handleChange: ownProps.handleChange || handleChange,\n };\n};\n\nconst createCombinatorRenderInfos = (combinatorSubSchemas, rootSchema, keyword, control, path, uischemas) => combinatorSubSchemas.map((subSchema, subSchemaIndex) => {\n const resolvedSubSchema = subSchema.$ref && Resolve.schema(rootSchema, subSchema.$ref, rootSchema);\n const schema = resolvedSubSchema ?? subSchema;\n return {\n schema,\n uischema: findUISchema(uischemas, schema, control.scope, path, undefined, control, rootSchema),\n label: subSchema.title ??\n resolvedSubSchema?.title ??\n `${keyword}-${subSchemaIndex}`,\n };\n});\n\nexport { ADD_CELL, ADD_DEFAULT_DATA, ADD_RENDERER, ADD_UI_SCHEMA, index$1 as Actions, ArrayTranslationEnum, CombinatorTranslationEnum, Draft4, Generate, Helpers, INIT, NOT_APPLICABLE, Paths, REMOVE_CELL, REMOVE_DEFAULT_DATA, REMOVE_RENDERER, REMOVE_UI_SCHEMA, Resolve, RuleEffect, Runtime, SET_AJV, SET_CONFIG, SET_LOCALE, SET_SCHEMA, SET_TRANSLATOR, SET_UISCHEMA, SET_VALIDATION_MODE, index as Test, UPDATE_CORE, UPDATE_DATA, UPDATE_ERRORS, UPDATE_I18N, VALIDATE, addI18nKeyToPrefix, and, arrayDefaultTranslations, categorizationHasCategory, cellReducer, clearAllIds, combinatorDefaultTranslations, compose, compose as composePaths, composeWithUi, computeChildLabel, computeLabel, configReducer, controlDefaultProps, convertDateToString, convertToValidClassName, coreReducer, createAjv, createCleanLabel, createCombinatorRenderInfos, createControlElement, createDefaultValue, createId, createLabelDescriptionFrom, decode, defaultDataReducer, defaultDateFormat, defaultDateTimeFormat, defaultErrorTranslator, defaultJsonFormsI18nState, defaultMapDispatchToControlProps, defaultMapStateToEnumCellProps, defaultMiddleware, defaultTimeFormat, defaultTranslator, deriveLabelForUISchemaElement, deriveTypes, doCreateDefaultValue, encode, enumToEnumOptionMapper, errorAt, errorsAt, evalEnablement, evalVisibility, extractAjv, extractData, extractDefaultData, extractDefaults, extractSchema, extractUiSchema, fetchErrorTranslator, fetchLocale, fetchTranslator, findAllRefs, findMatchingUISchema, findUISchema, findUiControl, formatErrorMessage, formatIs, generateDefaultUISchema, generateJsonSchema, getAdditionalErrors, getAjv, getArrayTranslations, getCells, getCombinatorTranslations, getCombinedErrorMessage, getConfig, getControlPath, getData, getDefaultData, getErrorAt, getErrorTranslator, getFirstPrimitiveProp, getI18nKey, getI18nKeyPrefix, getI18nKeyPrefixBySchema, getLocale, getOrCreateAjv, getPropPath, getRenderers, getSchema, getSubErrorsAt, getTranslator, getUISchemas, getUiSchema, getValidationMode, hasCategory, hasEnableRule, hasOption, hasShowRule, hasType, i18nReducer, init, initState, isAllOfControl, isAnyOfControl, isArrayObjectControl, isBooleanControl, isCategorization, isCategory, isControl, isControlElement, isDateControl, isDateTimeControl, isDescriptionHidden, isEnabled, isEnumControl, isEnumSchema, isGroup, isInherentlyEnabled, isIntegerControl, isInternationalized, isLabelable, isLabeled, isLayout, isMultiLineControl, isNumberControl, isNumberFormatControl, isObjectArray, isObjectArrayControl, isObjectArrayWithNesting, isObjectControl, isOneOfControl, isOneOfEnumControl, isOneOfEnumSchema, isPrimitiveArrayControl, isRangeControl, isScopable, isScoped, isStringControl, isTimeControl, isUpdateArrayContext, isVisible, iterateSchema, jsonFormsReducerConfig, layoutDefaultProps, mapDispatchToArrayControlProps, mapDispatchToCellProps, mapDispatchToControlProps, mapDispatchToMultiEnumProps, mapStateToAllOfProps, mapStateToAnyOfProps, mapStateToArrayControlProps, mapStateToArrayLayoutProps, mapStateToCellProps, mapStateToCombinatorRendererProps, mapStateToControlProps, mapStateToControlWithDetailProps, mapStateToDispatchCellProps, mapStateToEnumControlProps, mapStateToJsonFormsRendererProps, mapStateToLabelProps, mapStateToLayoutProps, mapStateToMasterListItemProps, mapStateToMultiEnumControlProps, mapStateToOneOfEnumCellProps, mapStateToOneOfEnumControlProps, mapStateToOneOfProps, moveDown, moveUp, not, oneOfToEnumOptionMapper, optionIs, or, rankWith, registerCell, registerDefaultData, registerRenderer, registerUISchema, removeId, rendererReducer, resolveData, resolveSchema, schemaMatches, schemaSubPathMatches, schemaTypeIs, scopeEndIs, scopeEndsWith, setAjv, setConfig, setLocale, setReadonly, setSchema, setTranslator, setUISchema, setValidationMode, showAsRequired, subErrorsAt, toDataPath, toDataPathSegments, transformPathToI18nPrefix, uiTypeIs, uischemaRegistryReducer, unregisterCell, unregisterDefaultData, unregisterRenderer, unregisterUISchema, unsetReadonly, update, updateCore, updateErrors, updateI18n, validate, withIncreasedRank };\n//# sourceMappingURL=jsonforms-core.esm.js.map\n"],"names":["ADDITIONAL_PROPERTIES","REQUIRED_PROPERTIES","Gen","constructor","findOption","this","schemaObject","data","props","properties","schema","type","additionalProperties","required","length","Object","keys","reduce","acc","propName","property","Number","isInteger","schemaObjectOrArray","Array","schemaArray","uniqueProperties","discriminator","known","filter","item","discriminatorValue","prototype","hasOwnProperty","call","distinct","map","prop","JSON","stringify","items","oneOf","generateJsonSchema","instance","options","optionName","compose","Set","path1","path2","p1","startsWith","toDataPathSegments","schemaPath","decodedSegments","replace","split","decode","startIndex","idx","encode","segment","pointerSegment","deriveLabel","controlElement","schemaElement","title","scope","ref","label","substr","lastIndexOf","createLabelDescriptionFrom","withLabel","labelProperty","labelDescription","text","show","resolveData","dataPath","curInstance","decodedSegment","resolveSchema","rootSchema","segments","resolveSchemaWithSegments","pathSegments","$ref","remainingSegments","pathSegment","undefined","singleSegmentResolveSchema","resolvedSchema","alternativeResolveResult","subSchemas","concat","allOf","anyOf","then","else","subSchema","RuleEffect","composeWithUi","scopableUi","path","isScoped","join","isInternationalized","element","i18n","isGroup","layout","isLayout","uischema","elements","obj","isScopable","isLabelable","getConditionScope","condition","evaluateCondition","ajv","isAndCondition","conditions","cur","isOrCondition","isLeafCondition","expectedValue","isSchemaCondition","value","failWhenUndefined","validate","isValidateFunctionCondition","context","fullData","uischemaElement","isRuleFulfilled","rule","hasShowRule","effect","SHOW","HIDE","isVisible","fulfilled","evalVisibility","isEnabled","DISABLE","ENABLE","evalEnablement","isOneOfEnumSchema","every","s","const","isEnumSchema","hasType","jsonSchema","expected","deriveTypes","enum","types","forEach","enumElement","add","from","allOfType","Resolve","createAjv","allErrors","verbose","strict","addUsedSchema","validator","errors","getControlPath","error","controlPath","instancePath","invalidProperty","keyword","params","missingProperty","additionalProperty","getInvalidProperty","endsWith","isObjectSchema","filteredErrorKeywords","createLayout","layoutType","createControlElement","generateUISchema","schemaElements","currentRef","schemaName","isCombinator","controlObject","push","labelName","fixedLabel","addLabel","nextRef","Error","generateDefaultUISchema","prefix","verticalLayout","wrapInLayoutIfNecessary","Generate","uiSchema","INIT","UPDATE_CORE","SET_AJV","UPDATE_DATA","UPDATE_ERRORS","ADD_RENDERER","REMOVE_RENDERER","ADD_CELL","REMOVE_CELL","SET_CONFIG","ADD_UI_SCHEMA","REMOVE_UI_SCHEMA","SET_SCHEMA","SET_UISCHEMA","SET_VALIDATION_MODE","SET_LOCALE","SET_TRANSLATOR","UPDATE_I18N","ADD_DEFAULT_DATA","REMOVE_DEFAULT_DATA","update","updater","index$1","freeze","__proto__","VALIDATE","isUpdateArrayContext","isArray","values","indices","i","moves","m","to","init","updateCore","registerDefaultData","unregisterDefaultData","setAjv","updateErrors","registerRenderer","tester","renderer","registerCell","cell","unregisterCell","unregisterRenderer","setConfig","config","setValidationMode","validationMode","registerUISchema","unregisterUISchema","setLocale","locale","setSchema","setTranslator","translator","errorTranslator","updateI18n","setUISchema","configDefault","restrict","trim","showUnfocusedDescription","hideRequiredAsterisk","applyDefaultConfiguration","configReducer","state","action","initState","additionalErrors","getValidationMode","hasValidationModeOption","option","getAdditionalErrors","getOrCreateAjv","hasAjvOption","compile","coreReducer","thisAjv","v","e","currentAjv","result","oldData","newData","newState","ArrayTranslationEnum","addTooltip","addAriaLabel","removeTooltip","removeAriaLabel","upAriaLabel","up","down","downAriaLabel","noDataMessage","noSelection","deleteDialogTitle","deleteDialogMessage","deleteDialogAccept","deleteDialogDecline","CombinatorTranslationEnum","clearDialogTitle","clearDialogMessage","clearDialogAccept","clearDialogDecline","getI18nKeyPrefixBySchema","getI18nKeyPrefix","test","transformPathToI18nPrefix","getI18nKey","key","defaultTranslator","_id","defaultMessage","defaultErrorTranslator","t","specializedKeywordMessage","parentSchema","genericKeywordMessage","messageCustomization","message","getCombinedErrorMessage","et","customErrorKey","specializedErrorMessage","formatErrorMessage","getTranslator","translate","fetchTranslator","getErrorTranslator","translateError","fetchErrorTranslator","defaultJsonFormsI18nState","i18nReducer","navigator","languages","isControl","schemaMatches","predicate","currentDataSchema","schemaSubPathMatches","subPath","schemaTypeIs","expectedType","formatIs","expectedFormat","format","uiTypeIs","optionIs","optionValue","and","testers","or","rankWith","rank","isBooleanControl","isEnumControl","isStringControl","isObjectArray","getErrorsAt","matchPath","combinatorPaths","indexOf","findIndex","p","errorsAt","getErrorAt","errorAt","jsonforms","core","getSubErrorsAt","subErrorsAt","getData","extractData","getSchema","extractSchema","getUiSchema","extractUiSchema","getAjv","extractAjv","getRenderers","getCells","getConfig","isInherentlyEnabled","ownProps","rootData","readonly","hasEnableRule","readOnly","enabled","move","array","index","delta","newIndex","indexes","sort","a","b","splice","computeLabel","createDefaultValue","defaultValue","doCreateDefaultValue","default","extractDefaults","date","dateString","toISOString","convertDateToString","Date","combinators","combinator","combinatorDefault","createDefaultValueForCombinatorSchema","combinatorSchemas","combinatorSchema","resolvedProperty","allOfSchema","isDescriptionHidden","visible","description","isFocused","enumToEnumOptionMapper","i18nKey","mapStateToControlProps","id","lastSegment","nextHigherSchemaPath","slice","nextHigherSchema","isRequired","labelDesc","te","i18nKeyPrefix","i18nLabel","cells","mapDispatchToControlProps","dispatch","handleChange","mapStateToControlWithDetailProps","uischemas","mapDispatchToArrayControlProps","addItem","removeItems","toDelete","reverse","moveUp","toMove","moveDown","layoutDefaultProps","direction","getDirection","mapStateToLayoutProps","stringifiedLabel","deriveLabelForUISchemaElement","renderers","mapStateToJsonFormsRendererProps","mapStateToArrayLayoutProps","childErrors","arraySchema","minItems"],"sourceRoot":""}