shinkansen-transmission 2.1.15 → 2.2.2

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 (82) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/babel.config.js +1 -1
  3. package/index.js +6 -1
  4. package/lib/index.js +1 -1
  5. package/lib/transmission/common/index.js +1 -1
  6. package/lib/transmission/from-document-to-hash/index.js +1 -1
  7. package/lib/transmission/from-hash-to-document/index.js +1 -1
  8. package/lib/transmission/index.js +1 -1
  9. package/lib/transmission/to-zashiki/index.js +1 -1
  10. package/lib/transmission/to-zashiki/transform-root-schema.js +1 -1
  11. package/lib/transmission/to-zashiki/transform-schema.js +1 -1
  12. package/package.json +23 -30
  13. package/src/transmission/from-document-to-hash/index.js +75 -29
  14. package/src/transmission/from-hash-to-document/index.js +13 -10
  15. package/src/transmission/to-zashiki/transform-root-schema.js +143 -136
  16. package/src/transmission/to-zashiki/transform-schema.js +3256 -1952
  17. package/.github/dependabot.yml +0 -9
  18. package/test/transmission/common/index.spec.js +0 -1348
  19. package/test/transmission/from-document-to-hash/index.spec.js +0 -1866
  20. package/test/transmission/from-hash-to-document/index.spec.js +0 -1523
  21. package/test/transmission/to-zashiki/transform-root-schema/transforming-array-type-schemas.spec.js +0 -1784
  22. package/test/transmission/to-zashiki/transform-root-schema/transforming-boolean-type-schemas.spec.js +0 -334
  23. package/test/transmission/to-zashiki/transform-root-schema/transforming-null-type-schemas.spec.js +0 -253
  24. package/test/transmission/to-zashiki/transform-root-schema/transforming-number-type-schemas.spec.js +0 -565
  25. package/test/transmission/to-zashiki/transform-root-schema/transforming-object-type-schemas.spec.js +0 -1715
  26. package/test/transmission/to-zashiki/transform-root-schema/transforming-string-type-schemas.spec.js +0 -496
  27. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-array-type-schemas.spec.js +0 -31633
  28. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-boolean-type-schemas.spec.js +0 -359
  29. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-null-type-schemas.spec.js +0 -359
  30. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-number-type-schemas.spec.js +0 -446
  31. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-object-type-schemas.spec.js +0 -8348
  32. package/test/transmission/to-zashiki/transform-root-schema/with-values/with-params/transforming-string-type-schemas.spec.js +0 -446
  33. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-array-type-schemas.spec.js +0 -30373
  34. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-boolean-type-schemas.spec.js +0 -334
  35. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-null-type-schemas.spec.js +0 -253
  36. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-number-type-schemas.spec.js +0 -421
  37. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-object-type-schemas.spec.js +0 -7826
  38. package/test/transmission/to-zashiki/transform-root-schema/with-values/without-params/transforming-string-type-schemas.spec.js +0 -421
  39. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-array-type-schemas.spec.js +0 -31111
  40. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-boolean-type-schemas.spec.js +0 -347
  41. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-null-type-schemas.spec.js +0 -344
  42. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-number-type-schemas.spec.js +0 -434
  43. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-object-type-schemas.spec.js +0 -8222
  44. package/test/transmission/to-zashiki/transform-root-schema/without-values/with-params/transforming-string-type-schemas.spec.js +0 -434
  45. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-array-type-schemas.spec.js +0 -29494
  46. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-boolean-type-schemas.spec.js +0 -312
  47. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-null-type-schemas.spec.js +0 -309
  48. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-number-type-schemas.spec.js +0 -399
  49. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-object-type-schemas.spec.js +0 -7584
  50. package/test/transmission/to-zashiki/transform-root-schema/without-values/without-params/transforming-string-type-schemas.spec.js +0 -398
  51. package/test/transmission/to-zashiki/transform-root-schema.spec.js +0 -22
  52. package/test/transmission/to-zashiki/transform-schema/transforming-array-type-schemas.spec.js +0 -1806
  53. package/test/transmission/to-zashiki/transform-schema/transforming-boolean-type-schemas.spec.js +0 -340
  54. package/test/transmission/to-zashiki/transform-schema/transforming-null-type-schemas.spec.js +0 -259
  55. package/test/transmission/to-zashiki/transform-schema/transforming-number-type-schemas.spec.js +0 -571
  56. package/test/transmission/to-zashiki/transform-schema/transforming-object-type-schemas.spec.js +0 -1737
  57. package/test/transmission/to-zashiki/transform-schema/transforming-string-type-schemas.spec.js +0 -502
  58. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-array-type-schemas.spec.js +0 -32173
  59. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-boolean-type-schemas.spec.js +0 -377
  60. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-null-type-schemas.spec.js +0 -377
  61. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-number-type-schemas.spec.js +0 -464
  62. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-object-type-schemas.spec.js +0 -8525
  63. package/test/transmission/to-zashiki/transform-schema/with-values/with-params/transforming-string-type-schemas.spec.js +0 -464
  64. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-array-type-schemas.spec.js +0 -30910
  65. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-boolean-type-schemas.spec.js +0 -352
  66. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-null-type-schemas.spec.js +0 -271
  67. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-number-type-schemas.spec.js +0 -439
  68. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-object-type-schemas.spec.js +0 -8003
  69. package/test/transmission/to-zashiki/transform-schema/with-values/without-params/transforming-string-type-schemas.spec.js +0 -439
  70. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-array-type-schemas.spec.js +0 -31654
  71. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-boolean-type-schemas.spec.js +0 -365
  72. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-null-type-schemas.spec.js +0 -362
  73. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-number-type-schemas.spec.js +0 -452
  74. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-object-type-schemas.spec.js +0 -8399
  75. package/test/transmission/to-zashiki/transform-schema/without-values/with-params/transforming-string-type-schemas.spec.js +0 -452
  76. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-array-type-schemas.spec.js +0 -29671
  77. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-boolean-type-schemas.spec.js +0 -320
  78. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-null-type-schemas.spec.js +0 -317
  79. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-number-type-schemas.spec.js +0 -407
  80. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-object-type-schemas.spec.js +0 -7645
  81. package/test/transmission/to-zashiki/transform-schema/without-values/without-params/transforming-string-type-schemas.spec.js +0 -406
  82. package/test/transmission/to-zashiki/transform-schema.spec.js +0 -777
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npm run pre-commit
package/babel.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const debug = require('debug')
2
2
 
3
- const log = debug('shinkansen:transmission')
3
+ const log = debug('shinkansen-transmission')
4
4
 
5
5
  const {
6
6
  env: {
package/index.js CHANGED
@@ -1,2 +1,7 @@
1
- //
1
+ const debug = require('debug')
2
+
3
+ const log = debug('shinkansen-transmission')
4
+
5
+ log('`transmission` is awake')
6
+
2
7
  module.exports = require('./lib')
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"fromDocumentToHash",{enumerable:true,get:function get(){return _fromDocumentToHash2["default"];}});Object.defineProperty(exports,"fromHashToDocument",{enumerable:true,get:function get(){return _fromHashToDocument2["default"];}});Object.defineProperty(exports,"toZashiki",{enumerable:true,get:function get(){return _toZashiki2["default"];}});exports.common=void 0;var _common=_interopRequireWildcard(require("./transmission/common"));exports.common=_common;var _fromDocumentToHash2=_interopRequireDefault(require("./transmission/from-document-to-hash"));var _fromHashToDocument2=_interopRequireDefault(require("./transmission/from-hash-to-document"));var _toZashiki2=_interopRequireDefault(require("./transmission/to-zashiki"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}require("core-js/modules/es.array.iterator.js");require("core-js/modules/es.object.to-string.js");require("core-js/modules/es.string.iterator.js");require("core-js/modules/es.weak-map.js");require("core-js/modules/web.dom-collections.iterator.js");require("core-js/modules/es.object.define-property.js");require("core-js/modules/es.object.get-own-property-descriptor.js");require("core-js/modules/es.symbol.js");require("core-js/modules/es.symbol.description.js");require("core-js/modules/es.symbol.iterator.js");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"fromDocumentToHash",{enumerable:true,get:function get(){return _fromDocumentToHash2["default"];}});Object.defineProperty(exports,"fromHashToDocument",{enumerable:true,get:function get(){return _fromHashToDocument2["default"];}});Object.defineProperty(exports,"toZashiki",{enumerable:true,get:function get(){return _toZashiki2["default"];}});exports.common=void 0;var _common=_interopRequireWildcard(require("./transmission/common"));exports.common=_common;var _fromDocumentToHash2=_interopRequireDefault(require("./transmission/from-document-to-hash"));var _fromHashToDocument2=_interopRequireDefault(require("./transmission/from-hash-to-document"));var _toZashiki2=_interopRequireDefault(require("./transmission/to-zashiki"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/es.symbol");require("core-js/modules/es.symbol.description");require("core-js/modules/es.symbol.iterator");require("core-js/modules/es.array.concat");require("core-js/modules/es.array.filter");require("core-js/modules/es.array.from");require("core-js/modules/es.array.is-array");require("core-js/modules/es.array.iterator");require("core-js/modules/es.array.last-index-of");require("core-js/modules/es.array.map");require("core-js/modules/es.array.slice");require("core-js/modules/es.date.to-string");require("core-js/modules/es.function.name");require("core-js/modules/es.number.constructor");require("core-js/modules/es.object.entries");require("core-js/modules/es.object.to-string");require("core-js/modules/es.reflect.get");require("core-js/modules/es.reflect.has");require("core-js/modules/es.regexp.constructor");require("core-js/modules/es.regexp.exec");require("core-js/modules/es.regexp.to-string");require("core-js/modules/es.string.ends-with");require("core-js/modules/es.string.iterator");require("core-js/modules/web.dom-collections.iterator");Object.defineProperty(exports,"__esModule",{value:true});exports.getSelectedItems=getSelectedItems;exports.isParentUri=isParentUri;exports.getMetaProps=getMetaProps;exports.getMetaDefaultValue=getMetaDefaultValue;exports.hasMetaValue=hasMetaValue;exports.getMetaValue=getMetaValue;exports.hasValue=hasValue;exports.getValue=getValue;exports.getValueForEnum=getValueForEnum;exports.getIndexForEnum=getIndexForEnum;exports.getValueForAnyOf=getValueForAnyOf;exports.getIndexForAnyOf=getIndexForAnyOf;exports.getValueForOneOf=getValueForOneOf;exports.getIndexForOneOf=getIndexForOneOf;exports.getElementsProps=getElementsProps;exports.getElementsTitleProps=getElementsTitleProps;exports.getElementsDescriptionProps=getElementsDescriptionProps;exports.getElementsFieldPropsForEnum=getElementsFieldPropsForEnum;exports.getElementsFieldPropsForOneOf=getElementsFieldPropsForOneOf;exports.getElementsFieldPropsForAnyOf=getElementsFieldPropsForAnyOf;exports.getElementsFieldPropsForAllOf=getElementsFieldPropsForAllOf;exports.getElementsFieldProps=getElementsFieldProps;exports.getElementsFieldValue=getElementsFieldValue;exports.getMin=getMin;exports.getMax=getMax;exports.getMinLength=getMinLength;exports.getMaxLength=getMaxLength;exports.getMinItems=getMinItems;exports.getMaxItems=getMaxItems;exports.getHasUniqueItems=getHasUniqueItems;exports.getMinContains=getMinContains;exports.getMaxContains=getMaxContains;exports.getMinProperties=getMinProperties;exports.getMaxProperties=getMaxProperties;exports.getIsExclusiveMin=getIsExclusiveMin;exports.getIsExclusiveMax=getIsExclusiveMax;exports.getStep=getStep;exports.getPattern=exports.normaliseUri=exports.getUri=exports.getAllOf=exports.hasAllOf=exports.getOneOf=exports.hasOneOf=exports.getAnyOf=exports.hasAnyOf=exports.getDefault=exports.hasDefault=exports.getConst=exports.hasConst=exports.getEnum=exports.hasEnum=exports.transformValue=exports.getIsWriteOnly=exports.getIsReadOnly=exports.getDescription=exports.getTitle=exports.isDefaultValue=exports.toDefaultValue=exports.isConstValue=exports.toConstValue=exports.isPrimitive=exports.isNullSchema=exports.isBooleanSchema=exports.isObjectSchema=exports.isArraySchema=exports.isNumberSchema=exports.isStringSchema=exports.isSchema=exports.isArray=exports.isObject=void 0;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var isObject=function isObject(v){return(v||false)instanceof Object&&!isArray(v);};exports.isObject=isObject;var isArray=function isArray(v){return Array.isArray(v);};exports.isArray=isArray;var isSchema=function isSchema(){var v=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(v,'type');};exports.isSchema=isSchema;var isStringSchema=function isStringSchema(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref.type;return type==='string';};exports.isStringSchema=isStringSchema;var isNumberSchema=function isNumberSchema(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref2.type;return type==='number';};exports.isNumberSchema=isNumberSchema;var isArraySchema=function isArraySchema(){var _ref3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref3.type;return type==='array';};exports.isArraySchema=isArraySchema;var isObjectSchema=function isObjectSchema(){var _ref4=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref4.type;return type==='object';};exports.isObjectSchema=isObjectSchema;var isBooleanSchema=function isBooleanSchema(){var _ref5=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref5.type;return type==='boolean';};exports.isBooleanSchema=isBooleanSchema;var isNullSchema=function isNullSchema(){var _ref6=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref6.type;return type==='null';};exports.isNullSchema=isNullSchema;var isPrimitive=function isPrimitive(v){return!isObject(v)&&!isArray(v);};exports.isPrimitive=isPrimitive;var toConstValue=function toConstValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'const');};exports.toConstValue=toConstValue;var isConstValue=function isConstValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'const');};exports.isConstValue=isConstValue;var toDefaultValue=function toDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'default');};exports.toDefaultValue=toDefaultValue;var isDefaultValue=function isDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'default');};exports.isDefaultValue=isDefaultValue;var getTitle=function getTitle(){var _ref7=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},title=_ref7.title;return title?{title:title}:{};};exports.getTitle=getTitle;var getDescription=function getDescription(){var _ref8=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},description=_ref8.description;return description?{description:description}:{};};exports.getDescription=getDescription;var getIsReadOnly=function getIsReadOnly(){var _ref9=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref9$readOnly=_ref9.readOnly,readOnly=_ref9$readOnly===void 0?false:_ref9$readOnly;return readOnly?{readOnly:readOnly}:{};};exports.getIsReadOnly=getIsReadOnly;var getIsWriteOnly=function getIsWriteOnly(){var _ref10=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref10$writeOnly=_ref10.writeOnly,writeOnly=_ref10$writeOnly===void 0?false:_ref10$writeOnly;return writeOnly?{writeOnly:writeOnly}:{};};exports.getIsWriteOnly=getIsWriteOnly;var getUriForRegExp=function getUriForRegExp(uri){return uri.endsWith('/')?uri:uri.concat('/');};function getSelectedItems(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var u=normaliseUri(uri);if(Reflect.has(values,u)){var v=Reflect.get(values,u);if(isPrimitive(v)){var n=Number(v);return isNaN(n)?[v]:[n];}else{return v.map(function(v){var n=Number(v);return isNaN(n)?v:n;});}}var pattern=new RegExp("^".concat(getUriForRegExp(u),"\\d+$"));return Object.entries(values).filter(function(_ref11){var _ref12=_slicedToArray(_ref11,1),key=_ref12[0];return pattern.test(key);}).map(function(_ref13){var _ref14=_slicedToArray(_ref13,2),key=_ref14[0],value=_ref14[1];var i=Number(key.slice(key.lastIndexOf('/')+1));var v=isArray(value)?value[i]:value;var n=Number(v);if(!isNaN(n))return n;return v;});}function isParentUri(){var parentUri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';return parentUri!=='#'&&parentUri!==uri;}function getMetaProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var meta;if(Reflect.has(params,uri)){var _Reflect$get=Reflect.get(params,uri);meta=_Reflect$get.meta;}return meta||{};}function getMetaDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'default')){var defaultValue=Reflect.get(schema,'default');return{defaultValue:String(defaultValue)};}return{};}function hasMetaValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);return isPrimitive(value);}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');return isPrimitive(constValue);}}return false;}function getMetaValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return{value:String(value)};}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return{value:String(constValue)};}}}return{};}var transformValue=function transformValue(schema){return isObject(schema)?isConstValue(schema)?toConstValue(schema):isDefaultValue(schema)?toDefaultValue(schema):schema:schema;};exports.transformValue=transformValue;function hasValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);return isPrimitive(value);}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');return isPrimitive(constValue);}}return false;}function getValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return String(value);}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return String(constValue);}}}}function getValueForEnum(v){var _ref15=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref15$enum=_ref15["enum"],items=_ref15$enum===void 0?[]:_ref15$enum;if(Reflect.has(items,v)){var enumValue=Reflect.get(items,v);return String(enumValue);}}function getIndexForEnum(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getValueForAnyOf(v){var _ref16=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref16$anyOf=_ref16.anyOf,items=_ref16$anyOf===void 0?[]:_ref16$anyOf;if(Reflect.has(items,v)){var anyOf=Reflect.get(items,v);var anyOfValue=transformValue(anyOf);if(isPrimitive(anyOfValue)){return String(anyOfValue);}}}function getIndexForAnyOf(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getValueForOneOf(v){var _ref17=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref17$oneOf=_ref17.oneOf,items=_ref17$oneOf===void 0?[]:_ref17$oneOf;if(Reflect.has(items,v)){var oneOf=Reflect.get(items,v);var oneOfValue=transformValue(oneOf);if(isPrimitive(oneOfValue)){return String(oneOfValue);}}}function getIndexForOneOf(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getElementsProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var elements;if(Reflect.has(params,uri)){var _Reflect$get2=Reflect.get(params,uri);var _Reflect$get2$element=_Reflect$get2.elements;elements=_Reflect$get2$element===void 0?{}:_Reflect$get2$element;}return elements||{};}function getElementsTitleProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var title;if(Reflect.has(params,uri)){var _Reflect$get3=Reflect.get(params,uri);var _Reflect$get3$element=_Reflect$get3.elements;_Reflect$get3$element=_Reflect$get3$element===void 0?{}:_Reflect$get3$element;title=_Reflect$get3$element.title;}return title||{};}function getElementsDescriptionProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var description;if(Reflect.has(params,uri)){var _Reflect$get4=Reflect.get(params,uri);var _Reflect$get4$element=_Reflect$get4.elements;_Reflect$get4$element=_Reflect$get4$element===void 0?{}:_Reflect$get4$element;description=_Reflect$get4$element.description;}return description||{};}function getElementsFieldPropsForEnum(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get5=Reflect.get(params,uri);var _Reflect$get5$element=_Reflect$get5.elements;_Reflect$get5$element=_Reflect$get5$element===void 0?{}:_Reflect$get5$element;field=_Reflect$get5$element["enum"];}return field||{};}function getElementsFieldPropsForOneOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get6=Reflect.get(params,uri);var _Reflect$get6$element=_Reflect$get6.elements;_Reflect$get6$element=_Reflect$get6$element===void 0?{}:_Reflect$get6$element;field=_Reflect$get6$element.oneOf;}return field||{};}function getElementsFieldPropsForAnyOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get7=Reflect.get(params,uri);var _Reflect$get7$element=_Reflect$get7.elements;_Reflect$get7$element=_Reflect$get7$element===void 0?{}:_Reflect$get7$element;field=_Reflect$get7$element.anyOf;}return field||{};}function getElementsFieldPropsForAllOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get8=Reflect.get(params,uri);var _Reflect$get8$element=_Reflect$get8.elements;_Reflect$get8$element=_Reflect$get8$element===void 0?{}:_Reflect$get8$element;field=_Reflect$get8$element.field;}return field||{};}function getElementsFieldProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get9=Reflect.get(params,uri);var _Reflect$get9$element=_Reflect$get9.elements;_Reflect$get9$element=_Reflect$get9$element===void 0?{}:_Reflect$get9$element;field=_Reflect$get9$element.field;}return field||{};}function getElementsFieldValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return{value:String(value)};}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return{value:String(constValue)};}}else{if(Reflect.has(schema,'default')){var defaultValue=Reflect.get(schema,'default');if(isPrimitive(defaultValue)){return{value:String(defaultValue)};}}}}return{};}var hasEnum=function hasEnum(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'enum');};exports.hasEnum=hasEnum;var getEnum=function getEnum(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'enum');};exports.getEnum=getEnum;var hasConst=function hasConst(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'const');};exports.hasConst=hasConst;var getConst=function getConst(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'const');};exports.getConst=getConst;var hasDefault=function hasDefault(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'default');};exports.hasDefault=hasDefault;var getDefault=function getDefault(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'default');};exports.getDefault=getDefault;var hasAnyOf=function hasAnyOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'anyOf');};exports.hasAnyOf=hasAnyOf;var getAnyOf=function getAnyOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'anyOf');};exports.getAnyOf=getAnyOf;var hasOneOf=function hasOneOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'oneOf');};exports.hasOneOf=hasOneOf;var getOneOf=function getOneOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'oneOf');};exports.getOneOf=getOneOf;var hasAllOf=function hasAllOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'allOf');};exports.hasAllOf=hasAllOf;var getAllOf=function getAllOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'allOf');};exports.getAllOf=getAllOf;var getUri=function getUri(){var uri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';var resource=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';return(uri.endsWith('/')?uri:uri.concat('/')).concat(resource);};exports.getUri=getUri;var normaliseUri=function normaliseUri(){var uri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';return uri==='#'?'#/':uri;};exports.normaliseUri=normaliseUri;function getMin(){var _ref18=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minimum=_ref18.minimum;var value=Number(minimum);return isNaN(value)?{}:{min:value};}function getMax(){var _ref19=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maximum=_ref19.maximum;var value=Number(maximum);return isNaN(value)?{}:{max:value};}function getMinLength(){var _ref20=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minLength=_ref20.minLength;var value=Number(minLength);return isNaN(value)?{}:{minLength:value};}function getMaxLength(){var _ref21=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxLength=_ref21.maxLength;var value=Number(maxLength);return isNaN(value)?{}:{maxLength:value};}function getMinItems(){var _ref22=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minItems=_ref22.minItems;var value=Number(minItems);return isNaN(value)?{}:{minItems:value};}function getMaxItems(){var _ref23=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxItems=_ref23.maxItems;var value=Number(maxItems);return isNaN(value)?{}:{maxItems:value};}function getHasUniqueItems(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'uniqueItems')){var value=Reflect.get(schema,'uniqueItems');return typeof value==='boolean'?{hasUniqueItems:value}:{};}return{};}function getMinContains(){var _ref24=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minContains=_ref24.minContains;var value=Number(minContains);return isNaN(value)?{}:{minContains:value};}function getMaxContains(){var _ref25=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxContains=_ref25.maxContains;var value=Number(maxContains);return isNaN(value)?{}:{maxContains:value};}function getMinProperties(){var _ref26=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minProperties=_ref26.minProperties;var value=Number(minProperties);return isNaN(value)?{}:{minProperties:value};}function getMaxProperties(){var _ref27=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxProperties=_ref27.maxProperties;var value=Number(maxProperties);return isNaN(value)?{}:{maxProperties:value};}function getIsExclusiveMin(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'exclusiveMinimum')){var value=Reflect.get(schema,'exclusiveMinimum');return typeof value==='boolean'?{isExclusiveMin:value}:{};}return{};}function getIsExclusiveMax(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'exclusiveMaximum')){var value=Reflect.get(schema,'exclusiveMaximum');return typeof value==='boolean'?{isExclusiveMax:value}:{};}return{};}var getPattern=function getPattern(){var _ref28=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},pattern=_ref28.pattern;return pattern?{pattern:pattern}:{};};exports.getPattern=getPattern;function getStep(){var _ref29=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},multipleOf=_ref29.multipleOf;var value=Number(multipleOf);return isNaN(value)?{}:{step:value};}
1
+ "use strict";require("core-js/modules/es.object.to-string.js");require("core-js/modules/es.symbol.iterator.js");require("core-js/modules/es.array.iterator.js");require("core-js/modules/es.string.iterator.js");require("core-js/modules/web.dom-collections.iterator.js");require("core-js/modules/es.function.name.js");require("core-js/modules/es.array.from.js");require("core-js/modules/es.object.define-property.js");Object.defineProperty(exports,"__esModule",{value:true});exports.getSelectedItems=getSelectedItems;exports.isParentUri=isParentUri;exports.getMetaProps=getMetaProps;exports.getMetaDefaultValue=getMetaDefaultValue;exports.hasMetaValue=hasMetaValue;exports.getMetaValue=getMetaValue;exports.hasValue=hasValue;exports.getValue=getValue;exports.getValueForEnum=getValueForEnum;exports.getIndexForEnum=getIndexForEnum;exports.getValueForAnyOf=getValueForAnyOf;exports.getIndexForAnyOf=getIndexForAnyOf;exports.getValueForOneOf=getValueForOneOf;exports.getIndexForOneOf=getIndexForOneOf;exports.getElementsProps=getElementsProps;exports.getElementsTitleProps=getElementsTitleProps;exports.getElementsDescriptionProps=getElementsDescriptionProps;exports.getElementsFieldPropsForEnum=getElementsFieldPropsForEnum;exports.getElementsFieldPropsForOneOf=getElementsFieldPropsForOneOf;exports.getElementsFieldPropsForAnyOf=getElementsFieldPropsForAnyOf;exports.getElementsFieldPropsForAllOf=getElementsFieldPropsForAllOf;exports.getElementsFieldProps=getElementsFieldProps;exports.getElementsFieldValue=getElementsFieldValue;exports.getMin=getMin;exports.getMax=getMax;exports.getMinLength=getMinLength;exports.getMaxLength=getMaxLength;exports.getMinItems=getMinItems;exports.getMaxItems=getMaxItems;exports.getHasUniqueItems=getHasUniqueItems;exports.getMinContains=getMinContains;exports.getMaxContains=getMaxContains;exports.getMinProperties=getMinProperties;exports.getMaxProperties=getMaxProperties;exports.getIsExclusiveMin=getIsExclusiveMin;exports.getIsExclusiveMax=getIsExclusiveMax;exports.getStep=getStep;exports.getPattern=exports.normaliseUri=exports.getUri=exports.getAllOf=exports.hasAllOf=exports.getOneOf=exports.hasOneOf=exports.getAnyOf=exports.hasAnyOf=exports.getDefault=exports.hasDefault=exports.getConst=exports.hasConst=exports.getEnum=exports.hasEnum=exports.transformValue=exports.getIsWriteOnly=exports.getIsReadOnly=exports.getDescription=exports.getTitle=exports.isDefaultValue=exports.toDefaultValue=exports.isConstValue=exports.toConstValue=exports.isPrimitive=exports.isNullSchema=exports.isBooleanSchema=exports.isObjectSchema=exports.isArraySchema=exports.isNumberSchema=exports.isStringSchema=exports.isSchema=exports.isArray=exports.isObject=void 0;require("core-js/modules/es.array.is-array.js");require("core-js/modules/es.reflect.has.js");require("core-js/modules/es.reflect.get.js");require("core-js/modules/es.symbol.js");require("core-js/modules/es.symbol.description.js");require("core-js/modules/es.string.ends-with.js");require("core-js/modules/es.array.concat.js");require("core-js/modules/es.number.constructor.js");require("core-js/modules/es.array.map.js");require("core-js/modules/es.regexp.constructor.js");require("core-js/modules/es.regexp.exec.js");require("core-js/modules/es.regexp.to-string.js");require("core-js/modules/es.array.filter.js");require("core-js/modules/es.object.entries.js");require("core-js/modules/es.array.slice.js");require("core-js/modules/es.array.last-index-of.js");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var isObject=function isObject(v){return(v||false)instanceof Object&&!isArray(v);};exports.isObject=isObject;var isArray=function isArray(v){return Array.isArray(v);};exports.isArray=isArray;var isSchema=function isSchema(){var v=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(v,'type');};exports.isSchema=isSchema;var isStringSchema=function isStringSchema(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref.type;return type==='string';};exports.isStringSchema=isStringSchema;var isNumberSchema=function isNumberSchema(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref2.type;return type==='number';};exports.isNumberSchema=isNumberSchema;var isArraySchema=function isArraySchema(){var _ref3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref3.type;return type==='array';};exports.isArraySchema=isArraySchema;var isObjectSchema=function isObjectSchema(){var _ref4=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref4.type;return type==='object';};exports.isObjectSchema=isObjectSchema;var isBooleanSchema=function isBooleanSchema(){var _ref5=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref5.type;return type==='boolean';};exports.isBooleanSchema=isBooleanSchema;var isNullSchema=function isNullSchema(){var _ref6=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},type=_ref6.type;return type==='null';};exports.isNullSchema=isNullSchema;var isPrimitive=function isPrimitive(v){return!isObject(v)&&!isArray(v);};exports.isPrimitive=isPrimitive;var toConstValue=function toConstValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'const');};exports.toConstValue=toConstValue;var isConstValue=function isConstValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'const');};exports.isConstValue=isConstValue;var toDefaultValue=function toDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'default');};exports.toDefaultValue=toDefaultValue;var isDefaultValue=function isDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'default');};exports.isDefaultValue=isDefaultValue;var getTitle=function getTitle(){var _ref7=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},title=_ref7.title;return title?{title:title}:{};};exports.getTitle=getTitle;var getDescription=function getDescription(){var _ref8=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},description=_ref8.description;return description?{description:description}:{};};exports.getDescription=getDescription;var getIsReadOnly=function getIsReadOnly(){var _ref9=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref9$readOnly=_ref9.readOnly,readOnly=_ref9$readOnly===void 0?false:_ref9$readOnly;return readOnly?{readOnly:readOnly}:{};};exports.getIsReadOnly=getIsReadOnly;var getIsWriteOnly=function getIsWriteOnly(){var _ref10=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref10$writeOnly=_ref10.writeOnly,writeOnly=_ref10$writeOnly===void 0?false:_ref10$writeOnly;return writeOnly?{writeOnly:writeOnly}:{};};exports.getIsWriteOnly=getIsWriteOnly;var getUriForRegExp=function getUriForRegExp(uri){return uri.endsWith('/')?uri:uri.concat('/');};function getSelectedItems(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var u=normaliseUri(uri);if(Reflect.has(values,u)){var v=Reflect.get(values,u);if(isPrimitive(v)){var n=Number(v);return isNaN(n)?[v]:[n];}else{return v.map(function(v){var n=Number(v);return isNaN(n)?v:n;});}}var pattern=new RegExp("^".concat(getUriForRegExp(u),"\\d+$"));return Object.entries(values).filter(function(_ref11){var _ref12=_slicedToArray(_ref11,1),key=_ref12[0];return pattern.test(key);}).map(function(_ref13){var _ref14=_slicedToArray(_ref13,2),key=_ref14[0],value=_ref14[1];var i=Number(key.slice(key.lastIndexOf('/')+1));var v=isArray(value)?value[i]:value;var n=Number(v);if(!isNaN(n))return n;return v;});}function isParentUri(){var parentUri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';return parentUri!=='#'&&parentUri!==uri;}function getMetaProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var meta;if(Reflect.has(params,uri)){var _Reflect$get=Reflect.get(params,uri);meta=_Reflect$get.meta;}return meta||{};}function getMetaDefaultValue(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'default')){var defaultValue=Reflect.get(schema,'default');return{defaultValue:String(defaultValue)};}return{};}function hasMetaValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);return isPrimitive(value);}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');return isPrimitive(constValue);}}return false;}function getMetaValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return{value:String(value)};}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return{value:String(constValue)};}}}return{};}var transformValue=function transformValue(schema){return isObject(schema)?isConstValue(schema)?toConstValue(schema):isDefaultValue(schema)?toDefaultValue(schema):schema:schema;};exports.transformValue=transformValue;function hasValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);return isPrimitive(value);}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');return isPrimitive(constValue);}}return false;}function getValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return String(value);}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return String(constValue);}}}}function getValueForEnum(v){var _ref15=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref15$enum=_ref15["enum"],items=_ref15$enum===void 0?[]:_ref15$enum;if(Reflect.has(items,v)){var enumValue=Reflect.get(items,v);return String(enumValue);}}function getIndexForEnum(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getValueForAnyOf(v){var _ref16=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref16$anyOf=_ref16.anyOf,items=_ref16$anyOf===void 0?[]:_ref16$anyOf;if(Reflect.has(items,v)){var anyOf=Reflect.get(items,v);var anyOfValue=transformValue(anyOf);if(isPrimitive(anyOfValue)){return String(anyOfValue);}}}function getIndexForAnyOf(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getValueForOneOf(v){var _ref17=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref17$oneOf=_ref17.oneOf,items=_ref17$oneOf===void 0?[]:_ref17$oneOf;if(Reflect.has(items,v)){var oneOf=Reflect.get(items,v);var oneOfValue=transformValue(oneOf);if(isPrimitive(oneOfValue)){return String(oneOfValue);}}}function getIndexForOneOf(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var schema=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(/\/\d+$/.test(uri)){return Number(uri.slice(uri.lastIndexOf('/')+1));}return NaN;}function getElementsProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var elements;if(Reflect.has(params,uri)){var _Reflect$get2=Reflect.get(params,uri);var _Reflect$get2$element=_Reflect$get2.elements;elements=_Reflect$get2$element===void 0?{}:_Reflect$get2$element;}return elements||{};}function getElementsTitleProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var title;if(Reflect.has(params,uri)){var _Reflect$get3=Reflect.get(params,uri);var _Reflect$get3$element=_Reflect$get3.elements;_Reflect$get3$element=_Reflect$get3$element===void 0?{}:_Reflect$get3$element;title=_Reflect$get3$element.title;}return title||{};}function getElementsDescriptionProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var description;if(Reflect.has(params,uri)){var _Reflect$get4=Reflect.get(params,uri);var _Reflect$get4$element=_Reflect$get4.elements;_Reflect$get4$element=_Reflect$get4$element===void 0?{}:_Reflect$get4$element;description=_Reflect$get4$element.description;}return description||{};}function getElementsFieldPropsForEnum(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get5=Reflect.get(params,uri);var _Reflect$get5$element=_Reflect$get5.elements;_Reflect$get5$element=_Reflect$get5$element===void 0?{}:_Reflect$get5$element;field=_Reflect$get5$element["enum"];}return field||{};}function getElementsFieldPropsForOneOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get6=Reflect.get(params,uri);var _Reflect$get6$element=_Reflect$get6.elements;_Reflect$get6$element=_Reflect$get6$element===void 0?{}:_Reflect$get6$element;field=_Reflect$get6$element.oneOf;}return field||{};}function getElementsFieldPropsForAnyOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get7=Reflect.get(params,uri);var _Reflect$get7$element=_Reflect$get7.elements;_Reflect$get7$element=_Reflect$get7$element===void 0?{}:_Reflect$get7$element;field=_Reflect$get7$element.anyOf;}return field||{};}function getElementsFieldPropsForAllOf(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get8=Reflect.get(params,uri);var _Reflect$get8$element=_Reflect$get8.elements;_Reflect$get8$element=_Reflect$get8$element===void 0?{}:_Reflect$get8$element;field=_Reflect$get8$element.field;}return field||{};}function getElementsFieldProps(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var field;if(Reflect.has(params,uri)){var _Reflect$get9=Reflect.get(params,uri);var _Reflect$get9$element=_Reflect$get9.elements;_Reflect$get9$element=_Reflect$get9$element===void 0?{}:_Reflect$get9$element;field=_Reflect$get9$element.field;}return field||{};}function getElementsFieldValue(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var uri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'#';var schema=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if(isPrimitive(value)){return{value:String(value)};}}else{if(Reflect.has(schema,'const')){var constValue=Reflect.get(schema,'const');if(isPrimitive(constValue)){return{value:String(constValue)};}}else{if(Reflect.has(schema,'default')){var defaultValue=Reflect.get(schema,'default');if(isPrimitive(defaultValue)){return{value:String(defaultValue)};}}}}return{};}var hasEnum=function hasEnum(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'enum');};exports.hasEnum=hasEnum;var getEnum=function getEnum(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'enum');};exports.getEnum=getEnum;var hasConst=function hasConst(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'const');};exports.hasConst=hasConst;var getConst=function getConst(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'const');};exports.getConst=getConst;var hasDefault=function hasDefault(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'default');};exports.hasDefault=hasDefault;var getDefault=function getDefault(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'default');};exports.getDefault=getDefault;var hasAnyOf=function hasAnyOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'anyOf');};exports.hasAnyOf=hasAnyOf;var getAnyOf=function getAnyOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'anyOf');};exports.getAnyOf=getAnyOf;var hasOneOf=function hasOneOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'oneOf');};exports.hasOneOf=hasOneOf;var getOneOf=function getOneOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'oneOf');};exports.getOneOf=getOneOf;var hasAllOf=function hasAllOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.has(schema,'allOf');};exports.hasAllOf=hasAllOf;var getAllOf=function getAllOf(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return Reflect.get(schema,'allOf');};exports.getAllOf=getAllOf;var getUri=function getUri(){var uri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';var resource=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';return(uri.endsWith('/')?uri:uri.concat('/')).concat(resource);};exports.getUri=getUri;var normaliseUri=function normaliseUri(){var uri=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'#';return uri==='#'?'#/':uri;};exports.normaliseUri=normaliseUri;function getMin(){var _ref18=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minimum=_ref18.minimum;var value=Number(minimum);return isNaN(value)?{}:{min:value};}function getMax(){var _ref19=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maximum=_ref19.maximum;var value=Number(maximum);return isNaN(value)?{}:{max:value};}function getMinLength(){var _ref20=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minLength=_ref20.minLength;var value=Number(minLength);return isNaN(value)?{}:{minLength:value};}function getMaxLength(){var _ref21=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxLength=_ref21.maxLength;var value=Number(maxLength);return isNaN(value)?{}:{maxLength:value};}function getMinItems(){var _ref22=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minItems=_ref22.minItems;var value=Number(minItems);return isNaN(value)?{}:{minItems:value};}function getMaxItems(){var _ref23=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxItems=_ref23.maxItems;var value=Number(maxItems);return isNaN(value)?{}:{maxItems:value};}function getHasUniqueItems(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'uniqueItems')){var value=Reflect.get(schema,'uniqueItems');return typeof value==='boolean'?{hasUniqueItems:value}:{};}return{};}function getMinContains(){var _ref24=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minContains=_ref24.minContains;var value=Number(minContains);return isNaN(value)?{}:{minContains:value};}function getMaxContains(){var _ref25=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxContains=_ref25.maxContains;var value=Number(maxContains);return isNaN(value)?{}:{maxContains:value};}function getMinProperties(){var _ref26=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},minProperties=_ref26.minProperties;var value=Number(minProperties);return isNaN(value)?{}:{minProperties:value};}function getMaxProperties(){var _ref27=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},maxProperties=_ref27.maxProperties;var value=Number(maxProperties);return isNaN(value)?{}:{maxProperties:value};}function getIsExclusiveMin(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'exclusiveMinimum')){var value=Reflect.get(schema,'exclusiveMinimum');return typeof value==='boolean'?{isExclusiveMin:value}:{};}return{};}function getIsExclusiveMax(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(Reflect.has(schema,'exclusiveMaximum')){var value=Reflect.get(schema,'exclusiveMaximum');return typeof value==='boolean'?{isExclusiveMax:value}:{};}return{};}var getPattern=function getPattern(){var _ref28=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},pattern=_ref28.pattern;return pattern?{pattern:pattern}:{};};exports.getPattern=getPattern;function getStep(){var _ref29=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},multipleOf=_ref29.multipleOf;var value=Number(multipleOf);return isNaN(value)?{}:{step:value};}
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/es.symbol");require("core-js/modules/es.symbol.description");require("core-js/modules/es.symbol.iterator");require("core-js/modules/es.array.filter");require("core-js/modules/es.array.find");require("core-js/modules/es.array.find-index");require("core-js/modules/es.array.for-each");require("core-js/modules/es.array.from");require("core-js/modules/es.array.is-array");require("core-js/modules/es.array.iterator");require("core-js/modules/es.array.map");require("core-js/modules/es.array.reduce");require("core-js/modules/es.array.slice");require("core-js/modules/es.array.some");require("core-js/modules/es.date.to-string");require("core-js/modules/es.function.name");require("core-js/modules/es.object.define-properties");require("core-js/modules/es.object.define-property");require("core-js/modules/es.object.entries");require("core-js/modules/es.object.get-own-property-descriptor");require("core-js/modules/es.object.get-own-property-descriptors");require("core-js/modules/es.object.keys");require("core-js/modules/es.object.to-string");require("core-js/modules/es.reflect.get");require("core-js/modules/es.regexp.to-string");require("core-js/modules/es.string.iterator");require("core-js/modules/web.dom-collections.for-each");require("core-js/modules/web.dom-collections.iterator");Object.defineProperty(exports,"__esModule",{value:true});exports.getObject=getObject;exports.getArray=getArray;exports.getSchema=getSchema;exports.transformValueIndexFor=transformValueIndexFor;exports.transformEqualIndexFor=transformEqualIndexFor;exports.transformArrayFor=transformArrayFor;exports.transformObjectFor=transformObjectFor;exports.transformArray=transformArray;exports.transformObject=transformObject;exports["default"]=transform;exports.transformValue=void 0;var _debug=_interopRequireDefault(require("debug"));var _fastDeepEqual=_interopRequireDefault(require("fast-deep-equal"));var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var log=(0,_debug["default"])('shinkansen-transmission:from-document-to-hash');function findByKey(parentUri,uri){return function find(key){return uri===(0,_common.getUri)(parentUri,key);};}function findByIndex(parentUri,uri){return function find(schema,index){if((0,_common.hasEnum)(schema)){}else{if((0,_common.hasAnyOf)(schema)){var array=(0,_common.getAnyOf)(schema);return array.find(findByIndex(parentUri,uri));}else{if((0,_common.hasOneOf)(schema)){var _array=(0,_common.getOneOf)(schema);return _array.find(findByIndex(parentUri,uri));}}}return(0,_common.getUri)(parentUri,index)===uri;};}function findByValue(value){return function find(schema){return value===transformValue(schema);};}function findByEqual(value){return function find(schema){return(0,_fastDeepEqual["default"])(value,transformValue(schema));};}function toString(value){return value!==undefined?String(value):'';}function getObject(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref$properties=_ref.properties,properties=_ref$properties===void 0?{}:_ref$properties;var parentUri=arguments.length>1?arguments[1]:undefined;var uri=arguments.length>2?arguments[2]:undefined;return Reflect.get(properties,Object.keys(properties).find(findByKey(parentUri,uri)));}function getArray(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref2$items=_ref2.items,items=_ref2$items===void 0?{}:_ref2$items;var parentUri=arguments.length>1?arguments[1]:undefined;var uri=arguments.length>2?arguments[2]:undefined;return(0,_common.isArray)(items)?items.find(findByIndex(parentUri,uri)):items;}function getSchema(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1?arguments[1]:undefined;var uri=arguments.length>2?arguments[2]:undefined;var type=schema.type;switch(type){case'object':return getObject(schema,parentUri,uri);case'array':return getArray(schema,parentUri,uri);default:return schema;}}var transformValue=function transformValue(schema){return(0,_common.isObject)(schema)?(0,_common.isConstValue)(schema)?(0,_common.toConstValue)(schema):(0,_common.isDefaultValue)(schema)?(0,_common.toDefaultValue)(schema):schema:schema;};exports.transformValue=transformValue;function transformValueIndexFor(array,value){var find=findByValue(value);if(array.some(find)){var index=array.findIndex(find);return String(index);}return toString(value);}function transformEqualIndexFor(array,value){var find=findByEqual(value);if(array.some(find)){var index=array.findIndex(find);return String(index);}return toString(value);}function transformArrayFor(document,schema,values,params,parentUri,uri){return document.reduce(function(values,value,index){var schemaUri=(0,_common.getUri)(parentUri,index);return transform(value,getSchema(schema,parentUri,schemaUri),values,params,schemaUri,schemaUri);},values);}function transformObjectFor(document,schema,values,params,parentUri,uri){return Object.entries(document).reduce(function(values,_ref3){var _ref4=_slicedToArray(_ref3,2),key=_ref4[0],value=_ref4[1];var schemaUri=(0,_common.getUri)(parentUri,key);return transform(value,getSchema(schema,parentUri,schemaUri),values,params,schemaUri,schemaUri);},values);}function transformArray(document,schema,values,params,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(array,value);})));}else{if((0,_common.hasAnyOf)(schema)){var _array2=(0,_common.getAnyOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(_array2,value);})));}else{if((0,_common.hasOneOf)(schema)){var _array3=(0,_common.getOneOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(_array3,value);})));}else{var _schema$items=schema.items,items=_schema$items===void 0?{}:_schema$items;if((0,_common.isArray)(items)){return transformArrayFor(document,schema,values,params,parentUri,uri);}else{if((0,_common.isObject)(items)){if((0,_common.hasEnum)(items)){var _array4=(0,_common.getEnum)(items);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(_array4,value);})));}else{if((0,_common.hasAnyOf)(items)){var _array5=(0,_common.getAnyOf)(items);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(_array5,value);})));}else{if((0,_common.hasOneOf)(items)){var _array6=(0,_common.getOneOf)(items);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,document.map(function(value){return transformValueIndexFor(_array6,value);})));}}}}}}}}return transformArrayFor(document,schema,values,params,parentUri,uri);}function transformObject(document,schema,values,params,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformEqualIndexFor(array,document)));}else{if((0,_common.hasAnyOf)(schema)){var _array7=(0,_common.getAnyOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformEqualIndexFor(_array7,document)));}else{if((0,_common.hasOneOf)(schema)){var _array8=(0,_common.getOneOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformEqualIndexFor(_array8,document)));}}}return transformObjectFor(document,schema,values,params,parentUri,uri);}function transform(document){var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var values=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var params=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var parentUri=arguments.length>4&&arguments[4]!==undefined?arguments[4]:'#';var uri=arguments.length>5&&arguments[5]!==undefined?arguments[5]:(0,_common.getUri)(parentUri);log('fromDocumentToHash');if((0,_common.isArray)(document)){return transformArray(document,schema,values,params,parentUri,uri);}else{if((0,_common.isObject)(document)){return transformObject(document,schema,values,params,parentUri,uri);}else{if((0,_common.hasEnum)(schema)){var items=(0,_common.getEnum)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformValueIndexFor(items,document)));}else{if((0,_common.hasAnyOf)(schema)){var _items=(0,_common.getAnyOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformValueIndexFor(_items,document)));}else{if((0,_common.hasOneOf)(schema)){var _items2=(0,_common.getOneOf)(schema);return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,transformValueIndexFor(_items2,document)));}}}}}return _objectSpread(_objectSpread({},values),{},_defineProperty({},uri,toString(document)));}
1
+ "use strict";require("core-js/modules/es.array.is-array.js");require("core-js/modules/es.symbol.js");require("core-js/modules/es.symbol.description.js");require("core-js/modules/es.object.to-string.js");require("core-js/modules/es.symbol.iterator.js");require("core-js/modules/es.array.iterator.js");require("core-js/modules/es.string.iterator.js");require("core-js/modules/web.dom-collections.iterator.js");require("core-js/modules/es.array.slice.js");require("core-js/modules/es.function.name.js");require("core-js/modules/es.array.from.js");require("core-js/modules/es.object.define-property.js");Object.defineProperty(exports,"__esModule",{value:true});exports.getObject=getObject;exports.getArray=getArray;exports.getSchema=getSchema;exports.transformValueIndexFor=transformValueIndexFor;exports.transformEqualIndexFor=transformEqualIndexFor;exports.transformArrayFor=transformArrayFor;exports.transformObjectFor=transformObjectFor;exports.transformArray=transformArray;exports.transformObject=transformObject;exports["default"]=transform;exports.transformValue=void 0;require("core-js/modules/es.array.find.js");require("core-js/modules/es.reflect.get.js");require("core-js/modules/es.object.keys.js");require("core-js/modules/es.array.some.js");require("core-js/modules/es.array.find-index.js");require("core-js/modules/es.array.reduce.js");require("core-js/modules/es.object.entries.js");require("core-js/modules/es.array.map.js");var _debug=_interopRequireDefault(require("debug"));var _fastDeepEqual=_interopRequireDefault(require("fast-deep-equal"));var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var log=(0,_debug["default"])('shinkansen-transmission:from-document-to-hash');log('`shinkansen-transmission` is awake');function findByKey(parentUri,uri){return function find(key){return(0,_common.getUri)(parentUri,key)===uri;};}function findByIndex(parentUri,uri){return function find(schema,index){if((0,_common.hasEnum)(schema)){return(0,_common.getUri)(parentUri,index)===uri;}else{if((0,_common.hasAnyOf)(schema)){var array=(0,_common.getAnyOf)(schema);return array.find(findByIndex(parentUri,uri));}else{if((0,_common.hasOneOf)(schema)){var _array=(0,_common.getOneOf)(schema);return _array.find(findByIndex(parentUri,uri));}}}return(0,_common.getUri)(parentUri,index)===uri;};}function findByValue(value){return function find(schema){return value===transformValue(schema);};}function findByEqual(value){return function find(schema){return(0,_fastDeepEqual["default"])(value,transformValue(schema));};}function toString(value){return value!==undefined?String(value):'';}function getObject(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref$properties=_ref.properties,properties=_ref$properties===void 0?{}:_ref$properties;var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'';return Reflect.get(properties,Object.keys(properties).find(findByKey(parentUri,uri)));}function getArray(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref2$items=_ref2.items,items=_ref2$items===void 0?{}:_ref2$items;var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'';return(0,_common.isArray)(items)?items.find(findByIndex(parentUri,uri)):items;}function getSchema(){var schema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var parentUri=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'';var type=schema.type;switch(type){case'object':return getObject(schema,parentUri,uri);case'array':return getArray(schema,parentUri,uri);default:return schema;}}var transformValue=function transformValue(schema){return(0,_common.isObject)(schema)?(0,_common.isConstValue)(schema)?(0,_common.toConstValue)(schema):(0,_common.isDefaultValue)(schema)?(0,_common.toDefaultValue)(schema):schema:schema;};exports.transformValue=transformValue;function transformValueIndexFor(array,value){var find=findByValue(value);if(array.some(find)){var index=array.findIndex(find);return String(index);}return toString(value);}function transformEqualIndexFor(array,value){var find=findByEqual(value);if(array.some(find)){var index=array.findIndex(find);return String(index);}return toString(value);}function transformArrayFor(document,schema,values,params,parentUri,uri){return document.reduce(function(values,value,index){var schemaUri=(0,_common.getUri)(parentUri,index);return transform(value,getSchema(schema,parentUri,schemaUri),values,params,schemaUri,schemaUri);},values);}function transformObjectFor(document,schema,values,params,parentUri,uri){return Object.entries(document).reduce(function(values,_ref3){var _ref4=_slicedToArray(_ref3,2),key=_ref4[0],value=_ref4[1];var schemaUri=(0,_common.getUri)(parentUri,key);return transform(value,getSchema(schema,parentUri,schemaUri),values,params,schemaUri,schemaUri);},values);}function transformArray(document,schema,values,params,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);values[uri]=document.map(function(value){return transformValueIndexFor(array,value);});return values;}else{if((0,_common.hasAnyOf)(schema)){var _array2=(0,_common.getAnyOf)(schema);values[uri]=document.map(function(value){return transformValueIndexFor(_array2,value);});return values;}else{if((0,_common.hasOneOf)(schema)){var _array3=(0,_common.getOneOf)(schema);values[uri]=document.map(function(value){return transformValueIndexFor(_array3,value);});return values;}else{var _schema$items=schema.items,items=_schema$items===void 0?{}:_schema$items;if((0,_common.isArray)(items)){return transformArrayFor(document,schema,values,params,parentUri,uri);}else{if((0,_common.isObject)(items)){if((0,_common.hasEnum)(items)){var _array4=(0,_common.getEnum)(items);values[uri]=document.map(function(value){return transformValueIndexFor(_array4,value);});return values;}else{if((0,_common.hasAnyOf)(items)){var _array5=(0,_common.getAnyOf)(items);values[uri]=document.map(function(value){return transformValueIndexFor(_array5,value);});return values;}else{if((0,_common.hasOneOf)(items)){var _array6=(0,_common.getOneOf)(items);values[uri]=document.map(function(value){return transformValueIndexFor(_array6,value);});return values;}}}}}}}}return transformArrayFor(document,schema,values,params,parentUri,uri);}function transformObject(document,schema,values,params,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);values[uri]=transformEqualIndexFor(array,document);return values;}else{if((0,_common.hasAnyOf)(schema)){var _array7=(0,_common.getAnyOf)(schema);values[uri]=transformEqualIndexFor(_array7,document);return values;}else{if((0,_common.hasOneOf)(schema)){var _array8=(0,_common.getOneOf)(schema);values[uri]=transformEqualIndexFor(_array8,document);return values;}}}return transformObjectFor(document,schema,values,params,parentUri,uri);}function transform(document){var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var values=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var params=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var parentUri=arguments.length>4&&arguments[4]!==undefined?arguments[4]:'#';var uri=arguments.length>5&&arguments[5]!==undefined?arguments[5]:(0,_common.getUri)(parentUri);log('fromDocumentToHash');if((0,_common.isArray)(document)){return transformArray(document,schema,values,params,parentUri,uri);}else{if((0,_common.isObject)(document)){return transformObject(document,schema,values,params,parentUri,uri);}else{if((0,_common.hasEnum)(schema)){var items=(0,_common.getEnum)(schema);values[uri]=transformValueIndexFor(items,document);return values;}else{if((0,_common.hasAnyOf)(schema)){var _items=(0,_common.getAnyOf)(schema);values[uri]=transformValueIndexFor(_items,document);return values;}else{if((0,_common.hasOneOf)(schema)){var _items2=(0,_common.getOneOf)(schema);values[uri]=transformValueIndexFor(_items2,document);return values;}}}}}values[uri]=toString(document);return values;}
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/es.symbol");require("core-js/modules/es.symbol.description");require("core-js/modules/es.symbol.iterator");require("core-js/modules/es.array.filter");require("core-js/modules/es.array.for-each");require("core-js/modules/es.array.from");require("core-js/modules/es.array.includes");require("core-js/modules/es.array.index-of");require("core-js/modules/es.array.is-array");require("core-js/modules/es.array.iterator");require("core-js/modules/es.array.map");require("core-js/modules/es.array.reduce");require("core-js/modules/es.array.slice");require("core-js/modules/es.date.to-string");require("core-js/modules/es.function.name");require("core-js/modules/es.number.constructor");require("core-js/modules/es.object.define-properties");require("core-js/modules/es.object.define-property");require("core-js/modules/es.object.entries");require("core-js/modules/es.object.get-own-property-descriptor");require("core-js/modules/es.object.get-own-property-descriptors");require("core-js/modules/es.object.keys");require("core-js/modules/es.object.to-string");require("core-js/modules/es.reflect.get");require("core-js/modules/es.reflect.has");require("core-js/modules/es.regexp.to-string");require("core-js/modules/es.string.ends-with");require("core-js/modules/es.string.includes");require("core-js/modules/es.string.iterator");require("core-js/modules/es.string.starts-with");require("core-js/modules/web.dom-collections.for-each");require("core-js/modules/web.dom-collections.iterator");Object.defineProperty(exports,"__esModule",{value:true});exports.toNull=toNull;exports.toBoolean=toBoolean;exports.toString=toString;exports.toNumber=toNumber;exports.transformValueFor=transformValueFor;exports.getArrayFor=getArrayFor;exports.transformArrayFor=transformArrayFor;exports.transformObjectFor=transformObjectFor;exports.transformItemsArrayFor=transformItemsArrayFor;exports.transformItemsObjectFor=transformItemsObjectFor;exports.transformObjectSchemaNull=transformObjectSchemaNull;exports.transformObjectSchemaBoolean=transformObjectSchemaBoolean;exports.transformObjectSchemaObject=transformObjectSchemaObject;exports.transformObjectSchemaArray=transformObjectSchemaArray;exports.transformObjectSchemaNumber=transformObjectSchemaNumber;exports.transformObjectSchemaString=transformObjectSchemaString;exports.transformObjectSchema=transformObjectSchema;exports.transformArraySchemaNull=transformArraySchemaNull;exports.transformArraySchemaBoolean=transformArraySchemaBoolean;exports.transformArraySchemaObject=transformArraySchemaObject;exports.transformArraySchemaArray=transformArraySchemaArray;exports.transformArraySchemaNumber=transformArraySchemaNumber;exports.transformArraySchemaString=transformArraySchemaString;exports.transformArraySchema=transformArraySchema;exports.transformNull=transformNull;exports.transformBoolean=transformBoolean;exports.transformObject=transformObject;exports.transformArray=transformArray;exports.transformNumber=transformNumber;exports.transformString=transformString;exports["default"]=transform;exports.transformValue=void 0;var _debug=_interopRequireDefault(require("debug"));var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var log=(0,_debug["default"])('shinkansen-transmission:from-hash-to-document:log');var error=(0,_debug["default"])('shinkansen-transmission:from-hash-to-document:error');function toNull(v){if(v===null||v==='null')return null;throw new Error('Invalid `null`');}function toBoolean(v){if(typeof v==='boolean')return v;if(v==='true')return true;if(v==='false')return false;throw new Error('Invalid `boolean`');}function toString(v){if(typeof v==='string')return v;if(typeof v==='number')return String(v);return JSON.stringify(v);}function toNumber(v){if(typeof v==='number')return v;if(v){var n=Number(v);if(!isNaN(n))return n;}throw new Error('Invalid `number`');}var transformValue=function transformValue(schema){return(0,_common.isObject)(schema)?(0,_common.isConstValue)(schema)?(0,_common.toConstValue)(schema):(0,_common.isDefaultValue)(schema)?(0,_common.toDefaultValue)(schema):schema:schema;};exports.transformValue=transformValue;function transformValueFor(value,array){try{var i=toNumber(value);if(Reflect.has(array,i)){var v=Reflect.get(array,i);return transformValue(v);}}catch(_ref){var _ref$message=_ref.message;var message=_ref$message===void 0?'No error message defined':_ref$message;error(message);}return value;}function getArrayFor(values){var array=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var uri=arguments.length>2?arguments[2]:undefined;if(Reflect.has(values,uri)){var v=Reflect.get(values,uri);var i=Number(v);if(!isNaN(i))return array[i];}return[];}function transformArrayFor(values,_ref2,parentUri,uri){var _ref2$items=_ref2.items,items=_ref2$items===void 0?null:_ref2$items;if((0,_common.isArray)(items)){return transformItemsArrayFor(values,items,parentUri,uri);}else{if((0,_common.isObject)(items)){return transformItemsObjectFor(values,items,parentUri,uri);}}return[];}function transformObjectFor(values,_ref3,parentUri,uri){var _ref3$properties=_ref3.properties,properties=_ref3$properties===void 0?null:_ref3$properties;if((0,_common.isObject)(properties)){return Object.entries(properties).reduce(function(accumulator,_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],schema=_ref5[1];var schemaUri=(0,_common.getUri)(parentUri,key);return _objectSpread(_objectSpread({},accumulator),{},_defineProperty({},key,transform(values,schema,schemaUri,schemaUri)));},{});}return{};}function transformItemsArrayFor(values){var items=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var parentUri=arguments.length>2?arguments[2]:undefined;var uri=arguments.length>3?arguments[3]:undefined;if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.isArray)(value)){return transform(values,items,uri,uri);}}return Object.keys(values).filter(function(key){return key.startsWith(uri);}).reduce(function(accumulator,key){var v=uri.endsWith('/')?key.slice(uri.length):key.slice(uri.length+1);var i=v?Number(v.includes('/')?v.slice(0,v.indexOf('/')):v):NaN;if(!isNaN(i)){var schemaUri=(0,_common.getUri)(parentUri,i);accumulator[i]=transform(values,items[i],schemaUri,schemaUri);}return accumulator;},[]);}function transformItemsObjectFor(values){var items=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parentUri=arguments.length>2?arguments[2]:undefined;var uri=arguments.length>3?arguments[3]:undefined;if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.isArray)(value)){return transform(values,items,uri,uri);}}return Object.keys(values).filter(function(key){return key.startsWith(uri);}).reduce(function(accumulator,key){var v=uri.endsWith('/')?key.slice(uri.length):key.slice(uri.length+1);var i=v?Number(v.includes('/')?v.slice(0,v.indexOf('/')):v):NaN;if(!isNaN(i)){var schemaUri=(0,_common.getUri)(parentUri,i);accumulator[i]=transform(values,items,schemaUri,schemaUri);}return accumulator;},[]);}var handleError=function handleError(_ref6){var _ref6$message=_ref6.message,message=_ref6$message===void 0?'No error message defined':_ref6$message;return error(message);};function transformObjectSchemaNull(values,schema,_ref7){var parentUri=_ref7.uri,fieldKey=_ref7.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformNull(values,schema,parentUri,uri);}function transformObjectSchemaBoolean(values,schema,_ref8){var parentUri=_ref8.uri,fieldKey=_ref8.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformBoolean(values,schema,parentUri,uri);}function transformObjectSchemaObject(values,schema,_ref9){var parentUri=_ref9.uri,fieldKey=_ref9.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformObject(values,schema,uri,uri);}function transformObjectSchemaArray(values,schema,_ref10){var parentUri=_ref10.uri,fieldKey=_ref10.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformArray(values,schema,uri,uri);}function transformObjectSchemaNumber(values,schema,_ref11){var parentUri=_ref11.uri,fieldKey=_ref11.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformNumber(values,schema,parentUri,uri);}function transformObjectSchemaString(values,schema,_ref12){var parentUri=_ref12.uri,fieldKey=_ref12.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformString(values,schema,parentUri,uri);}function transformObjectSchema(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var type=schema.type;switch(type){case'null':return transformObjectSchemaNull(values,schema,params);case'boolean':return transformObjectSchemaBoolean(values,schema,params);case'object':return transformObjectSchemaObject(values,schema,params);case'array':return transformObjectSchemaArray(values,schema,params);case'number':return transformObjectSchemaNumber(values,schema,params);case'string':return transformObjectSchemaString(values,schema,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}function transformArraySchemaNull(values,schema,_ref13){var parentUri=_ref13.uri,arrayIndex=_ref13.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformNull(values,schema,parentUri,uri);}function transformArraySchemaBoolean(values,schema,_ref14){var parentUri=_ref14.uri,arrayIndex=_ref14.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformBoolean(values,schema,parentUri,uri);}function transformArraySchemaObject(values,schema,_ref15){var parentUri=_ref15.uri,arrayIndex=_ref15.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformObject(values,schema,uri,uri);}function transformArraySchemaArray(values,schema,_ref16){var parentUri=_ref16.uri,arrayIndex=_ref16.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformArray(values,schema,uri,uri);}function transformArraySchemaNumber(values,schema,_ref17){var parentUri=_ref17.uri,arrayIndex=_ref17.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformNumber(values,schema,parentUri,uri);}function transformArraySchemaString(values,schema,_ref18){var parentUri=_ref18.uri,arrayIndex=_ref18.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformString(values,schema,parentUri,uri);}function transformArraySchema(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var type=schema.type;switch(type){case'null':return transformArraySchemaNull(values,schema,params);case'boolean':return transformArraySchemaBoolean(values,schema,params);case'object':return transformArraySchemaObject(values,schema,params);case'array':return transformArraySchemaArray(values,schema,params);case'number':return transformArraySchemaNumber(values,schema,params);case'string':return transformArraySchemaString(values,schema,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}function transformNull(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array);});return transformValueFor(value,_array);}else{if((0,_common.hasOneOf)(schema)){var _array2=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array2);});return transformValueFor(value,_array2);}}}try{if((0,_common.isArray)(value))return value.map(toNull);return toNull(value);}catch(e){handleError(e);}return value;}}function transformBoolean(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array3=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array3);});return transformValueFor(value,_array3);}else{if((0,_common.hasOneOf)(schema)){var _array4=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array4);});return transformValueFor(value,_array4);}}}try{if((0,_common.isArray)(value))return value.map(toBoolean);return toBoolean(value);}catch(e){handleError(e);}return value;}}function transformObject(values,schema,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return getArrayFor(values,array,uri);}else{if((0,_common.hasAnyOf)(schema)){var _array5=(0,_common.getAnyOf)(schema);return getArrayFor(values,_array5,uri);}else{if((0,_common.hasOneOf)(schema)){var _array6=(0,_common.getOneOf)(schema);return getArrayFor(values,_array6,uri);}}}return transformObjectFor(values,schema,parentUri,uri);}function transformArray(values,schema,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return getArrayFor(values,array,uri);}else{if((0,_common.hasAnyOf)(schema)){var _array7=(0,_common.getAnyOf)(schema);return getArrayFor(values,_array7,uri);}else{if((0,_common.hasOneOf)(schema)){var _array8=(0,_common.getOneOf)(schema);return getArrayFor(values,_array8,uri);}}}return transformArrayFor(values,schema,parentUri,uri);}function transformNumber(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array9=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array9);});return transformValueFor(value,_array9);}else{if((0,_common.hasOneOf)(schema)){var _array10=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array10);});return transformValueFor(value,_array10);}}}try{if((0,_common.isArray)(value))return value.map(toNumber);return toNumber(value);}catch(e){handleError(e);}return value;}}function transformString(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array11=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array11);});return transformValueFor(value,_array11);}else{if((0,_common.hasOneOf)(schema)){var _array12=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array12);});return transformValueFor(value,_array12);}}}try{if((0,_common.isArray)(value))return value.map(toString);return toString(value);}catch(e){handleError(e);}return value;}}function transform(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var rootSchema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);log('fromHashToDocument');var type=rootSchema.type;switch(type){case'null':return transformNull(values,rootSchema,parentUri,uri);case'boolean':return transformBoolean(values,rootSchema,parentUri,uri);case'object':return transformObject(values,rootSchema,parentUri,uri);case'array':return transformArray(values,rootSchema,parentUri,uri);case'number':return transformNumber(values,rootSchema,parentUri,uri);case'string':return transformString(values,rootSchema,parentUri,uri);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}
1
+ "use strict";require("core-js/modules/es.array.is-array.js");require("core-js/modules/es.symbol.js");require("core-js/modules/es.symbol.description.js");require("core-js/modules/es.object.to-string.js");require("core-js/modules/es.symbol.iterator.js");require("core-js/modules/es.array.iterator.js");require("core-js/modules/es.string.iterator.js");require("core-js/modules/web.dom-collections.iterator.js");require("core-js/modules/es.function.name.js");require("core-js/modules/es.array.from.js");require("core-js/modules/es.object.define-property.js");require("core-js/modules/es.date.to-string.js");require("core-js/modules/es.regexp.to-string.js");Object.defineProperty(exports,"__esModule",{value:true});exports.toNull=toNull;exports.toBoolean=toBoolean;exports.toString=toString;exports.toNumber=toNumber;exports.transformValueFor=transformValueFor;exports.getArrayFor=getArrayFor;exports.transformArrayFor=transformArrayFor;exports.transformObjectFor=transformObjectFor;exports.transformItemsArrayFor=transformItemsArrayFor;exports.transformItemsObjectFor=transformItemsObjectFor;exports.transformObjectSchemaNull=transformObjectSchemaNull;exports.transformObjectSchemaBoolean=transformObjectSchemaBoolean;exports.transformObjectSchemaObject=transformObjectSchemaObject;exports.transformObjectSchemaArray=transformObjectSchemaArray;exports.transformObjectSchemaNumber=transformObjectSchemaNumber;exports.transformObjectSchemaString=transformObjectSchemaString;exports.transformObjectSchema=transformObjectSchema;exports.transformArraySchemaNull=transformArraySchemaNull;exports.transformArraySchemaBoolean=transformArraySchemaBoolean;exports.transformArraySchemaObject=transformArraySchemaObject;exports.transformArraySchemaArray=transformArraySchemaArray;exports.transformArraySchemaNumber=transformArraySchemaNumber;exports.transformArraySchemaString=transformArraySchemaString;exports.transformArraySchema=transformArraySchema;exports.transformNull=transformNull;exports.transformBoolean=transformBoolean;exports.transformObject=transformObject;exports.transformArray=transformArray;exports.transformNumber=transformNumber;exports.transformString=transformString;exports["default"]=transform;exports.transformValue=void 0;require("core-js/modules/es.number.constructor.js");require("core-js/modules/es.reflect.has.js");require("core-js/modules/es.reflect.get.js");require("core-js/modules/es.array.reduce.js");require("core-js/modules/es.object.entries.js");require("core-js/modules/es.array.filter.js");require("core-js/modules/es.object.keys.js");require("core-js/modules/es.string.starts-with.js");require("core-js/modules/es.string.ends-with.js");require("core-js/modules/es.array.slice.js");require("core-js/modules/es.array.includes.js");require("core-js/modules/es.string.includes.js");require("core-js/modules/es.array.index-of.js");require("core-js/modules/es.array.map.js");var _debug=_interopRequireDefault(require("debug"));var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var log=(0,_debug["default"])('shinkansen-transmission:from-hash-to-document');log('`shinkansen-transmission` is awake');function toNull(v){if(v===null||v==='null')return null;throw new Error('Invalid `null`');}function toBoolean(v){if(typeof v==='boolean')return v;if(v==='true')return true;if(v==='false')return false;throw new Error('Invalid `boolean`');}function toString(v){if(typeof v==='string')return v;if(typeof v==='number')return String(v);return JSON.stringify(v);}function toNumber(v){if(typeof v==='number')return v;if(v){var n=Number(v);if(!isNaN(n))return n;}throw new Error('Invalid `number`');}var transformValue=function transformValue(schema){return(0,_common.isObject)(schema)?(0,_common.isConstValue)(schema)?(0,_common.toConstValue)(schema):(0,_common.isDefaultValue)(schema)?(0,_common.toDefaultValue)(schema):schema:schema;};exports.transformValue=transformValue;function transformValueFor(value,array){try{var i=toNumber(value);if(Reflect.has(array,i)){var v=Reflect.get(array,i);return transformValue(v);}}catch(_ref){var _ref$message=_ref.message;var message=_ref$message===void 0?'No error message defined':_ref$message;log(message);}return value;}function getArrayFor(values){var array=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var uri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';if(Reflect.has(values,uri)){var v=Reflect.get(values,uri);var i=Number(v);if(!isNaN(i))return array[i];}return[];}function transformArrayFor(values){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref2$items=_ref2.items,items=_ref2$items===void 0?null:_ref2$items;var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);if((0,_common.isArray)(items)){return transformItemsArrayFor(values,items,parentUri,uri);}else{if((0,_common.isObject)(items)){return transformItemsObjectFor(values,items,parentUri,uri);}}return[];}function transformObjectFor(values){var _ref3=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref3$properties=_ref3.properties,properties=_ref3$properties===void 0?null:_ref3$properties;var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);if((0,_common.isObject)(properties)){return Object.entries(properties).reduce(function(accumulator,_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],schema=_ref5[1];var schemaUri=(0,_common.getUri)(parentUri,key);accumulator[key]=transform(values,schema,schemaUri,schemaUri);return accumulator;},{});}return{};}function transformItemsArrayFor(values){var items=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.isArray)(value)){return transform(values,items,uri,uri);}}return Object.keys(values).filter(function(key){return key.startsWith(uri);}).reduce(function(accumulator,key){var v=uri.endsWith('/')?key.slice(uri.length):key.slice(uri.length+1);var i=v?Number(v.includes('/')?v.slice(0,v.indexOf('/')):v):NaN;if(!isNaN(i)){var schemaUri=(0,_common.getUri)(parentUri,i);accumulator[i]=transform(values,items[i],schemaUri,schemaUri);}return accumulator;},[]);}function transformItemsObjectFor(values){var items=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.isArray)(value)){return transform(values,items,uri,uri);}}return Object.keys(values).filter(function(key){return key.startsWith(uri);}).reduce(function(accumulator,key){var v=uri.endsWith('/')?key.slice(uri.length):key.slice(uri.length+1);var i=v?Number(v.includes('/')?v.slice(0,v.indexOf('/')):v):NaN;if(!isNaN(i)){var schemaUri=(0,_common.getUri)(parentUri,i);accumulator[i]=transform(values,items,schemaUri,schemaUri);}return accumulator;},[]);}var handleError=function handleError(_ref6){var _ref6$message=_ref6.message,message=_ref6$message===void 0?'No error message defined':_ref6$message;return log(message);};function transformObjectSchemaNull(values,schema,_ref7){var parentUri=_ref7.uri,fieldKey=_ref7.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformNull(values,schema,parentUri,uri);}function transformObjectSchemaBoolean(values,schema,_ref8){var parentUri=_ref8.uri,fieldKey=_ref8.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformBoolean(values,schema,parentUri,uri);}function transformObjectSchemaObject(values,schema,_ref9){var parentUri=_ref9.uri,fieldKey=_ref9.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformObject(values,schema,uri,uri);}function transformObjectSchemaArray(values,schema,_ref10){var parentUri=_ref10.uri,fieldKey=_ref10.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformArray(values,schema,uri,uri);}function transformObjectSchemaNumber(values,schema,_ref11){var parentUri=_ref11.uri,fieldKey=_ref11.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformNumber(values,schema,parentUri,uri);}function transformObjectSchemaString(values,schema,_ref12){var parentUri=_ref12.uri,fieldKey=_ref12.key;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,fieldKey);return transformString(values,schema,parentUri,uri);}function transformObjectSchema(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var type=schema.type;switch(type){case'null':return transformObjectSchemaNull(values,schema,params);case'boolean':return transformObjectSchemaBoolean(values,schema,params);case'object':return transformObjectSchemaObject(values,schema,params);case'array':return transformObjectSchemaArray(values,schema,params);case'number':return transformObjectSchemaNumber(values,schema,params);case'string':return transformObjectSchemaString(values,schema,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}function transformArraySchemaNull(values,schema,_ref13){var parentUri=_ref13.uri,arrayIndex=_ref13.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformNull(values,schema,parentUri,uri);}function transformArraySchemaBoolean(values,schema,_ref14){var parentUri=_ref14.uri,arrayIndex=_ref14.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformBoolean(values,schema,parentUri,uri);}function transformArraySchemaObject(values,schema,_ref15){var parentUri=_ref15.uri,arrayIndex=_ref15.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformObject(values,schema,uri,uri);}function transformArraySchemaArray(values,schema,_ref16){var parentUri=_ref16.uri,arrayIndex=_ref16.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformArray(values,schema,uri,uri);}function transformArraySchemaNumber(values,schema,_ref17){var parentUri=_ref17.uri,arrayIndex=_ref17.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformNumber(values,schema,parentUri,uri);}function transformArraySchemaString(values,schema,_ref18){var parentUri=_ref18.uri,arrayIndex=_ref18.index;var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri,arrayIndex);return transformString(values,schema,parentUri,uri);}function transformArraySchema(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var schema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var type=schema.type;switch(type){case'null':return transformArraySchemaNull(values,schema,params);case'boolean':return transformArraySchemaBoolean(values,schema,params);case'object':return transformArraySchemaObject(values,schema,params);case'array':return transformArraySchemaArray(values,schema,params);case'number':return transformArraySchemaNumber(values,schema,params);case'string':return transformArraySchemaString(values,schema,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}function transformNull(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array);});return transformValueFor(value,_array);}else{if((0,_common.hasOneOf)(schema)){var _array2=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array2);});return transformValueFor(value,_array2);}}}try{if((0,_common.isArray)(value))return value.map(toNull);return toNull(value);}catch(e){handleError(e);}return value;}}function transformBoolean(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array3=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array3);});return transformValueFor(value,_array3);}else{if((0,_common.hasOneOf)(schema)){var _array4=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array4);});return transformValueFor(value,_array4);}}}try{if((0,_common.isArray)(value))return value.map(toBoolean);return toBoolean(value);}catch(e){handleError(e);}return value;}}function transformObject(values,schema,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return getArrayFor(values,array,uri);}else{if((0,_common.hasAnyOf)(schema)){var _array5=(0,_common.getAnyOf)(schema);return getArrayFor(values,_array5,uri);}else{if((0,_common.hasOneOf)(schema)){var _array6=(0,_common.getOneOf)(schema);return getArrayFor(values,_array6,uri);}}}return transformObjectFor(values,schema,parentUri,uri);}function transformArray(values,schema,parentUri,uri){if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);return getArrayFor(values,array,uri);}else{if((0,_common.hasAnyOf)(schema)){var _array7=(0,_common.getAnyOf)(schema);return getArrayFor(values,_array7,uri);}else{if((0,_common.hasOneOf)(schema)){var _array8=(0,_common.getOneOf)(schema);return getArrayFor(values,_array8,uri);}}}return transformArrayFor(values,schema,parentUri,uri);}function transformNumber(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array9=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array9);});return transformValueFor(value,_array9);}else{if((0,_common.hasOneOf)(schema)){var _array10=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array10);});return transformValueFor(value,_array10);}}}try{if((0,_common.isArray)(value))return value.map(toNumber);return toNumber(value);}catch(e){handleError(e);}return value;}}function transformString(values,schema,parentUri,uri){if(Reflect.has(values,uri)){var value=Reflect.get(values,uri);if((0,_common.hasEnum)(schema)){var array=(0,_common.getEnum)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,array);});return transformValueFor(value,array);}else{if((0,_common.hasAnyOf)(schema)){var _array11=(0,_common.getAnyOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array11);});return transformValueFor(value,_array11);}else{if((0,_common.hasOneOf)(schema)){var _array12=(0,_common.getOneOf)(schema);if((0,_common.isArray)(value))return value.map(function(v){return transformValueFor(v,_array12);});return transformValueFor(value,_array12);}}}try{if((0,_common.isArray)(value))return value.map(toString);return toString(value);}catch(e){handleError(e);}return value;}}function transform(){var values=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var rootSchema=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parentUri=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'#';var uri=arguments.length>3&&arguments[3]!==undefined?arguments[3]:(0,_common.getUri)(parentUri);log('fromHashToDocument');var type=rootSchema.type;switch(type){case'null':return transformNull(values,rootSchema,parentUri,uri);case'boolean':return transformBoolean(values,rootSchema,parentUri,uri);case'object':return transformObject(values,rootSchema,parentUri,uri);case'array':return transformArray(values,rootSchema,parentUri,uri);case'number':return transformNumber(values,rootSchema,parentUri,uri);case'string':return transformString(values,rootSchema,parentUri,uri);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}
@@ -1 +1 @@
1
- "use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"fromDocumentToHash",{enumerable:true,get:function get(){return _fromDocumentToHash2["default"];}});Object.defineProperty(exports,"fromHashToDocument",{enumerable:true,get:function get(){return _fromHashToDocument2["default"];}});Object.defineProperty(exports,"toZashiki",{enumerable:true,get:function get(){return _toZashiki2["default"];}});exports.common=void 0;var _common=_interopRequireWildcard(require("./common"));exports.common=_common;var _fromDocumentToHash2=_interopRequireDefault(require("./from-document-to-hash"));var _fromHashToDocument2=_interopRequireDefault(require("./from-hash-to-document"));var _toZashiki2=_interopRequireDefault(require("./to-zashiki"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}require("core-js/modules/es.array.iterator.js");require("core-js/modules/es.object.to-string.js");require("core-js/modules/es.string.iterator.js");require("core-js/modules/es.weak-map.js");require("core-js/modules/web.dom-collections.iterator.js");require("core-js/modules/es.object.define-property.js");require("core-js/modules/es.object.get-own-property-descriptor.js");require("core-js/modules/es.symbol.js");require("core-js/modules/es.symbol.description.js");require("core-js/modules/es.symbol.iterator.js");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"fromDocumentToHash",{enumerable:true,get:function get(){return _fromDocumentToHash2["default"];}});Object.defineProperty(exports,"fromHashToDocument",{enumerable:true,get:function get(){return _fromHashToDocument2["default"];}});Object.defineProperty(exports,"toZashiki",{enumerable:true,get:function get(){return _toZashiki2["default"];}});exports.common=void 0;var _common=_interopRequireWildcard(require("./common"));exports.common=_common;var _fromDocumentToHash2=_interopRequireDefault(require("./from-document-to-hash"));var _fromHashToDocument2=_interopRequireDefault(require("./from-hash-to-document"));var _toZashiki2=_interopRequireDefault(require("./to-zashiki"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _transformRootSchema["default"];}});var _transformRootSchema=_interopRequireDefault(require("./transform-root-schema"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}
1
+ "use strict";require("core-js/modules/es.object.define-property.js");Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _transformRootSchema["default"];}});var _transformRootSchema=_interopRequireDefault(require("./transform-root-schema"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}
@@ -1 +1 @@
1
- "use strict";require("core-js/modules/es.symbol");require("core-js/modules/es.array.filter");require("core-js/modules/es.array.for-each");require("core-js/modules/es.array.index-of");require("core-js/modules/es.array.map");require("core-js/modules/es.array.reduce");require("core-js/modules/es.object.define-properties");require("core-js/modules/es.object.define-property");require("core-js/modules/es.object.entries");require("core-js/modules/es.object.get-own-property-descriptor");require("core-js/modules/es.object.get-own-property-descriptors");require("core-js/modules/es.object.keys");require("core-js/modules/web.dom-collections.for-each");Object.defineProperty(exports,"__esModule",{value:true});exports.getRenderParamsForEnum=getRenderParamsForEnum;exports.getRenderParamsForAnyOf=getRenderParamsForAnyOf;exports.getRenderParamsForOneOf=getRenderParamsForOneOf;exports.getRenderParamsForAllOf=getRenderParamsForAllOf;exports.getRenderParams=getRenderParams;exports.transformNullForEnum=transformNullForEnum;exports.transformNullForAnyOf=transformNullForAnyOf;exports.transformNullForOneOf=transformNullForOneOf;exports.transformNullForAllOf=transformNullForAllOf;exports.transformNull=transformNull;exports.transformBooleanForEnum=transformBooleanForEnum;exports.transformBooleanForAnyOf=transformBooleanForAnyOf;exports.transformBooleanForOneOf=transformBooleanForOneOf;exports.transformBooleanForAllOf=transformBooleanForAllOf;exports.transformBoolean=transformBoolean;exports.transformObjectForEnum=transformObjectForEnum;exports.transformObjectForAnyOf=transformObjectForAnyOf;exports.transformObjectForOneOf=transformObjectForOneOf;exports.transformObjectForAllOf=transformObjectForAllOf;exports.transformObject=transformObject;exports.transformArrayForEnum=transformArrayForEnum;exports.transformArrayForAnyOf=transformArrayForAnyOf;exports.transformArrayForOneOf=transformArrayForOneOf;exports.transformArrayForAllOf=transformArrayForAllOf;exports.transformArray=transformArray;exports.transformNumberForEnum=transformNumberForEnum;exports.transformNumberForAnyOf=transformNumberForAnyOf;exports.transformNumberForOneOf=transformNumberForOneOf;exports.transformNumberForAllOf=transformNumberForAllOf;exports.transformNumber=transformNumber;exports.transformStringForEnum=transformStringForEnum;exports.transformStringForAnyOf=transformStringForAnyOf;exports.transformStringForOneOf=transformStringForOneOf;exports.transformStringForAllOf=transformStringForAllOf;exports.transformString=transformString;exports["default"]=toZashiki;var _debug=_interopRequireDefault(require("debug"));var _common=require("../common");var _transformSchema=require("./transform-schema");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var log=(0,_debug["default"])('shinkansen-transmission:to-zashiki:root-schema');function getRenderParamsForEnum(rootSchema,values,params){var _params$parentUri=params.parentUri,parentUri=_params$parentUri===void 0?'#':_params$parentUri,_params$uri=params.uri,uri=_params$uri===void 0?'#/':_params$uri,_params$selectedItems=params.selectedItems,selectedItems=_params$selectedItems===void 0?[]:_params$selectedItems,_params$items=params.items,items=_params$items===void 0?[]:_params$items;return _objectSpread(_objectSpread({},params),{},_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:_objectSpread(_objectSpread({},(0,_common.getMetaProps)(params,uri)),{},{schema:rootSchema,selectedItems:selectedItems,items:items}),elements:{"enum":_objectSpread(_objectSpread({},(0,_common.getElementsFieldPropsForEnum)(params,uri)),{},{selectedItems:selectedItems,items:items})}}));}function getRenderParamsForAnyOf(rootSchema,values,params){var _params$parentUri2=params.parentUri,parentUri=_params$parentUri2===void 0?'#':_params$parentUri2,_params$uri2=params.uri,uri=_params$uri2===void 0?'#/':_params$uri2,_params$selectedItems2=params.selectedItems,selectedItems=_params$selectedItems2===void 0?[]:_params$selectedItems2,_params$items2=params.items,items=_params$items2===void 0?[]:_params$items2;return _objectSpread(_objectSpread({},params),{},_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:_objectSpread(_objectSpread({},(0,_common.getMetaProps)(params,uri)),{},{schema:rootSchema,selectedItems:selectedItems,items:items}),elements:{anyOf:_objectSpread(_objectSpread({},(0,_common.getElementsFieldPropsForAnyOf)(params,uri)),{},{selectedItems:selectedItems,items:items})}}));}function getRenderParamsForOneOf(rootSchema,values,params){var _params$parentUri3=params.parentUri,parentUri=_params$parentUri3===void 0?'#':_params$parentUri3,_params$uri3=params.uri,uri=_params$uri3===void 0?'#/':_params$uri3,_params$selectedItems3=params.selectedItems,selectedItems=_params$selectedItems3===void 0?[]:_params$selectedItems3,_params$items3=params.items,items=_params$items3===void 0?[]:_params$items3;return _objectSpread(_objectSpread({},params),{},_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:_objectSpread(_objectSpread({},(0,_common.getMetaProps)(params,uri)),{},{schema:rootSchema,selectedItems:selectedItems,items:items}),elements:{oneOf:_objectSpread(_objectSpread({},(0,_common.getElementsFieldPropsForOneOf)(params,uri)),{},{selectedItems:selectedItems,items:items})}}));}function getRenderParamsForAllOf(rootSchema,values,params){var _params$parentUri4=params.parentUri,parentUri=_params$parentUri4===void 0?'#':_params$parentUri4,_params$uri4=params.uri,uri=_params$uri4===void 0?'#/':_params$uri4;return _objectSpread(_objectSpread({},params),{},_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:_objectSpread(_objectSpread({},(0,_common.getMetaProps)(params,uri)),{},{schema:rootSchema}),elements:{field:_objectSpread({},(0,_common.getElementsFieldPropsForAllOf)(params,uri))}}));}function getRenderParams(rootSchema,values,params){var _params$parentUri5=params.parentUri,parentUri=_params$parentUri5===void 0?'#':_params$parentUri5,_params$uri5=params.uri,uri=_params$uri5===void 0?'#/':_params$uri5,_params$fields=params.fields,fields=_params$fields===void 0?[]:_params$fields;return _objectSpread(_objectSpread({},params),{},_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:_objectSpread(_objectSpread({},(0,_common.getMetaProps)(params,uri)),{},{schema:rootSchema,parentUri:(0,_common.normaliseUri)(parentUri),uri:uri}),elements:_objectSpread(_objectSpread({},(0,_common.getElementsProps)(params,uri)),{},{fields:fields})}));}function transformNullForEnum(rootSchema,values,params){var _params$uri6=params.uri,uri=_params$uri6===void 0?'#/':_params$uri6;var _getMetaProps=(0,_common.getMetaProps)(params,uri),_getMetaProps$selecte=_getMetaProps.selectedItems,selectedItems=_getMetaProps$selecte===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps$selecte;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderNullForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNullForAnyOf(rootSchema,values,params){var _params$uri7=params.uri,uri=_params$uri7===void 0?'#/':_params$uri7;var _getMetaProps2=(0,_common.getMetaProps)(params,uri),_getMetaProps2$select=_getMetaProps2.selectedItems,selectedItems=_getMetaProps2$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps2$select;var _rootSchema$anyOf=rootSchema.anyOf,anyOf=_rootSchema$anyOf===void 0?[]:_rootSchema$anyOf;var items=anyOf.map((0,_transformSchema.mapTransformNullByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNullForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNullForOneOf(rootSchema,values,params){var _params$uri8=params.uri,uri=_params$uri8===void 0?'#/':_params$uri8;var _getMetaProps3=(0,_common.getMetaProps)(params,uri),_getMetaProps3$select=_getMetaProps3.selectedItems,selectedItems=_getMetaProps3$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps3$select;var _rootSchema$oneOf=rootSchema.oneOf,oneOf=_rootSchema$oneOf===void 0?[]:_rootSchema$oneOf;var items=oneOf.map((0,_transformSchema.mapTransformNullByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNullForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNullForAllOf(rootSchema,values,params){var _rootSchema$allOf=rootSchema.allOf,allOf=_rootSchema$allOf===void 0?[]:_rootSchema$allOf,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderNullForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformNull(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformNullForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformNullForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformNullForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformNullForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderNull)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformBooleanForEnum(rootSchema,values,params){var _params$uri9=params.uri,uri=_params$uri9===void 0?'#/':_params$uri9;var _getMetaProps4=(0,_common.getMetaProps)(params,uri),_getMetaProps4$select=_getMetaProps4.selectedItems,selectedItems=_getMetaProps4$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps4$select;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderBooleanForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformBooleanForAnyOf(rootSchema,values,params){var _params$uri10=params.uri,uri=_params$uri10===void 0?'#/':_params$uri10;var _getMetaProps5=(0,_common.getMetaProps)(params,uri),_getMetaProps5$select=_getMetaProps5.selectedItems,selectedItems=_getMetaProps5$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps5$select;var _rootSchema$anyOf2=rootSchema.anyOf,anyOf=_rootSchema$anyOf2===void 0?[]:_rootSchema$anyOf2;var items=anyOf.map((0,_transformSchema.mapTransformBooleanByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderBooleanForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformBooleanForOneOf(rootSchema,values,params){var _params$uri11=params.uri,uri=_params$uri11===void 0?'#/':_params$uri11;var _getMetaProps6=(0,_common.getMetaProps)(params,uri),_getMetaProps6$select=_getMetaProps6.selectedItems,selectedItems=_getMetaProps6$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps6$select;var _rootSchema$oneOf2=rootSchema.oneOf,oneOf=_rootSchema$oneOf2===void 0?[]:_rootSchema$oneOf2;var items=oneOf.map((0,_transformSchema.mapTransformBooleanByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderBooleanForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformBooleanForAllOf(rootSchema,values,params){var _rootSchema$allOf2=rootSchema.allOf,allOf=_rootSchema$allOf2===void 0?[]:_rootSchema$allOf2,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderBooleanForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformBoolean(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformBooleanForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformBooleanForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformBooleanForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformBooleanForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderBoolean)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformObjectForEnum(rootSchema,values,params){var _params$uri12=params.uri,uri=_params$uri12===void 0?'#/':_params$uri12;var _getMetaProps7=(0,_common.getMetaProps)(params,uri),_getMetaProps7$select=_getMetaProps7.selectedItems,selectedItems=_getMetaProps7$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps7$select;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderObjectForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformObjectForAnyOf(rootSchema,values,params){var _params$uri13=params.uri,uri=_params$uri13===void 0?'#/':_params$uri13;var _getMetaProps8=(0,_common.getMetaProps)(params,uri),_getMetaProps8$select=_getMetaProps8.selectedItems,selectedItems=_getMetaProps8$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps8$select;var _rootSchema$anyOf3=rootSchema.anyOf,anyOf=_rootSchema$anyOf3===void 0?[]:_rootSchema$anyOf3;var items=anyOf.map((0,_transformSchema.mapTransformObjectByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderObjectForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformObjectForOneOf(rootSchema,values,params){var _params$uri14=params.uri,uri=_params$uri14===void 0?'#/':_params$uri14;var _getMetaProps9=(0,_common.getMetaProps)(params,uri),_getMetaProps9$select=_getMetaProps9.selectedItems,selectedItems=_getMetaProps9$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps9$select;var _rootSchema$oneOf3=rootSchema.oneOf,oneOf=_rootSchema$oneOf3===void 0?[]:_rootSchema$oneOf3;var items=oneOf.map((0,_transformSchema.mapTransformObjectByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderObjectForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformObjectForAllOf(rootSchema,values,params){var _rootSchema$allOf3=rootSchema.allOf,allOf=_rootSchema$allOf3===void 0?[]:_rootSchema$allOf3,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderObjectForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformObject(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformObjectForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformObjectForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformObjectForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformObjectForAllOf(rootSchema,values,params);}}}}var _rootSchema$propertie=rootSchema.properties,properties=_rootSchema$propertie===void 0?{}:_rootSchema$propertie,_rootSchema$required=rootSchema.required,required=_rootSchema$required===void 0?[]:_rootSchema$required;var _params$uri15=params.uri,uri=_params$uri15===void 0?'#/':_params$uri15;var fields=Object.entries(properties).map((0,_transformSchema.mapTransformByKey)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{parentUri:uri,required:required})));return(0,_transformSchema.renderObject)(rootSchema,values,getRenderParams(rootSchema,values,_objectSpread(_objectSpread({},params),{},{fields:fields})));}function transformArrayForEnum(rootSchema,values,params){var _params$uri16=params.uri,uri=_params$uri16===void 0?'#/':_params$uri16;var _getMetaProps10=(0,_common.getMetaProps)(params,uri),_getMetaProps10$selec=_getMetaProps10.selectedItems,selectedItems=_getMetaProps10$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps10$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderArrayForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformArrayForAnyOf(rootSchema,values,params){var _params$uri17=params.uri,uri=_params$uri17===void 0?'#/':_params$uri17;var _getMetaProps11=(0,_common.getMetaProps)(params,uri),_getMetaProps11$selec=_getMetaProps11.selectedItems,selectedItems=_getMetaProps11$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps11$selec;var _rootSchema$anyOf4=rootSchema.anyOf,anyOf=_rootSchema$anyOf4===void 0?[]:_rootSchema$anyOf4;var items=anyOf.map((0,_transformSchema.mapTransformArrayByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderArrayForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformArrayForOneOf(rootSchema,values,params){var _params$uri18=params.uri,uri=_params$uri18===void 0?'#/':_params$uri18;var _getMetaProps12=(0,_common.getMetaProps)(params,uri),_getMetaProps12$selec=_getMetaProps12.selectedItems,selectedItems=_getMetaProps12$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps12$selec;var _rootSchema$oneOf4=rootSchema.oneOf,oneOf=_rootSchema$oneOf4===void 0?[]:_rootSchema$oneOf4;var items=oneOf.map((0,_transformSchema.mapTransformArrayByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderArrayForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformArrayForAllOf(rootSchema,values,params){var _rootSchema$allOf4=rootSchema.allOf,allOf=_rootSchema$allOf4===void 0?[]:_rootSchema$allOf4,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderArrayForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformArray(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformArrayForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformArrayForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformArrayForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformArrayForAllOf(rootSchema,values,params);}}}}var _rootSchema$items=rootSchema.items,items=_rootSchema$items===void 0?[]:_rootSchema$items;if((0,_common.isArray)(items)){var fields=items.map((0,_transformSchema.mapTransformByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{parentUri:'#/'})));return(0,_transformSchema.renderArray)(rootSchema,values,getRenderParams(rootSchema,values,_objectSpread(_objectSpread({},params),{},{fields:fields})));}else{if((0,_common.isObject)(items)){var _fields=[(0,_transformSchema.getTransformByIndex)(items,rootSchema,values,_objectSpread(_objectSpread({},params),{},{parentUri:'#/'}))];return(0,_transformSchema.renderArray)(rootSchema,values,getRenderParams(rootSchema,values,_objectSpread(_objectSpread({},params),{},{fields:_fields})));}}}function transformNumberForEnum(rootSchema,values,params){var _params$uri19=params.uri,uri=_params$uri19===void 0?'#/':_params$uri19;var _getMetaProps13=(0,_common.getMetaProps)(params,uri),_getMetaProps13$selec=_getMetaProps13.selectedItems,selectedItems=_getMetaProps13$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps13$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderNumberForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNumberForAnyOf(rootSchema,values,params){var _params$uri20=params.uri,uri=_params$uri20===void 0?'#/':_params$uri20;var _getMetaProps14=(0,_common.getMetaProps)(params,uri),_getMetaProps14$selec=_getMetaProps14.selectedItems,selectedItems=_getMetaProps14$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps14$selec;var _rootSchema$anyOf5=rootSchema.anyOf,anyOf=_rootSchema$anyOf5===void 0?[]:_rootSchema$anyOf5;var items=anyOf.map((0,_transformSchema.mapTransformNumberByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNumberForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNumberForOneOf(rootSchema,values,params){var _params$uri21=params.uri,uri=_params$uri21===void 0?'#/':_params$uri21;var _getMetaProps15=(0,_common.getMetaProps)(params,uri),_getMetaProps15$selec=_getMetaProps15.selectedItems,selectedItems=_getMetaProps15$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps15$selec;var _rootSchema$oneOf5=rootSchema.oneOf,oneOf=_rootSchema$oneOf5===void 0?[]:_rootSchema$oneOf5;var items=oneOf.map((0,_transformSchema.mapTransformNumberByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNumberForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformNumberForAllOf(rootSchema,values,params){var _rootSchema$allOf5=rootSchema.allOf,allOf=_rootSchema$allOf5===void 0?[]:_rootSchema$allOf5,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderNumberForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformNumber(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformNumberForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformNumberForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformNumberForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformNumberForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderNumber)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformStringForEnum(rootSchema,values,params){var _params$uri22=params.uri,uri=_params$uri22===void 0?'#/':_params$uri22;var _getMetaProps16=(0,_common.getMetaProps)(params,uri),_getMetaProps16$selec=_getMetaProps16.selectedItems,selectedItems=_getMetaProps16$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps16$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderStringForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformStringForAnyOf(rootSchema,values,params){var _params$uri23=params.uri,uri=_params$uri23===void 0?'#/':_params$uri23;var _getMetaProps17=(0,_common.getMetaProps)(params,uri),_getMetaProps17$selec=_getMetaProps17.selectedItems,selectedItems=_getMetaProps17$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps17$selec;var _rootSchema$anyOf6=rootSchema.anyOf,anyOf=_rootSchema$anyOf6===void 0?[]:_rootSchema$anyOf6;var items=anyOf.map((0,_transformSchema.mapTransformStringByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderStringForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformStringForOneOf(rootSchema,values,params){var _params$uri24=params.uri,uri=_params$uri24===void 0?'#/':_params$uri24;var _getMetaProps18=(0,_common.getMetaProps)(params,uri),_getMetaProps18$selec=_getMetaProps18.selectedItems,selectedItems=_getMetaProps18$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps18$selec;var _rootSchema$oneOf6=rootSchema.oneOf,oneOf=_rootSchema$oneOf6===void 0?[]:_rootSchema$oneOf6;var items=oneOf.map((0,_transformSchema.mapTransformStringByIndex)(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderStringForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,_objectSpread(_objectSpread({},params),{},{selectedItems:selectedItems,items:items})));}function transformStringForAllOf(rootSchema,values,params){var _rootSchema$allOf6=rootSchema.allOf,allOf=_rootSchema$allOf6===void 0?[]:_rootSchema$allOf6,rest=_objectWithoutProperties(rootSchema,["allOf"]);var itemSchema=allOf.reduce(function(accumulator,schema){return _objectSpread(_objectSpread({},accumulator),schema);},rest);return(0,_transformSchema.renderStringForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformString(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformStringForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformStringForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformStringForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformStringForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderString)(rootSchema,values,getRenderParams(rootSchema,values,params));}function toZashiki(){var rootSchema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};log('toZashiki');var type=rootSchema.type;switch(type){case'null':return transformNull(rootSchema,values,params);case'boolean':return transformBoolean(rootSchema,values,params);case'object':return transformObject(rootSchema,values,params);case'array':return transformArray(rootSchema,values,params);case'number':return transformNumber(rootSchema,values,params);case'string':return transformString(rootSchema,values,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}
1
+ "use strict";require("core-js/modules/es.object.define-property.js");require("core-js/modules/es.object.keys.js");require("core-js/modules/es.array.index-of.js");require("core-js/modules/es.symbol.js");Object.defineProperty(exports,"__esModule",{value:true});exports.getRenderParamsForEnum=getRenderParamsForEnum;exports.getRenderParamsForAnyOf=getRenderParamsForAnyOf;exports.getRenderParamsForOneOf=getRenderParamsForOneOf;exports.getRenderParamsForAllOf=getRenderParamsForAllOf;exports.getRenderParams=getRenderParams;exports.transformNullForEnum=transformNullForEnum;exports.transformNullForAnyOf=transformNullForAnyOf;exports.transformNullForOneOf=transformNullForOneOf;exports.transformNullForAllOf=transformNullForAllOf;exports.transformNull=transformNull;exports.transformBooleanForEnum=transformBooleanForEnum;exports.transformBooleanForAnyOf=transformBooleanForAnyOf;exports.transformBooleanForOneOf=transformBooleanForOneOf;exports.transformBooleanForAllOf=transformBooleanForAllOf;exports.transformBoolean=transformBoolean;exports.transformObjectForEnum=transformObjectForEnum;exports.transformObjectForAnyOf=transformObjectForAnyOf;exports.transformObjectForOneOf=transformObjectForOneOf;exports.transformObjectForAllOf=transformObjectForAllOf;exports.transformObject=transformObject;exports.transformArrayForEnum=transformArrayForEnum;exports.transformArrayForAnyOf=transformArrayForAnyOf;exports.transformArrayForOneOf=transformArrayForOneOf;exports.transformArrayForAllOf=transformArrayForAllOf;exports.transformArray=transformArray;exports.transformNumberForEnum=transformNumberForEnum;exports.transformNumberForAnyOf=transformNumberForAnyOf;exports.transformNumberForOneOf=transformNumberForOneOf;exports.transformNumberForAllOf=transformNumberForAllOf;exports.transformNumber=transformNumber;exports.transformStringForEnum=transformStringForEnum;exports.transformStringForAnyOf=transformStringForAnyOf;exports.transformStringForOneOf=transformStringForOneOf;exports.transformStringForAllOf=transformStringForAllOf;exports.transformString=transformString;exports["default"]=toZashiki;require("core-js/modules/es.object.assign.js");require("core-js/modules/es.array.map.js");require("core-js/modules/es.array.reduce.js");require("core-js/modules/es.object.entries.js");var _debug=_interopRequireDefault(require("debug"));var _common=require("../common");var _transformSchema=require("./transform-schema");var _excluded=["allOf"],_excluded2=["allOf"],_excluded3=["allOf"],_excluded4=["allOf"],_excluded5=["allOf"],_excluded6=["allOf"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj};}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var log=(0,_debug["default"])('shinkansen-transmission:to-zashiki:root-schema');log('`shinkansen-transmission` is awake');function getRenderParamsForEnum(rootSchema,values,params){var _params$parentUri=params.parentUri,parentUri=_params$parentUri===void 0?'#':_params$parentUri,_params$uri=params.uri,uri=_params$uri===void 0?'#/':_params$uri,_params$selectedItems=params.selectedItems,selectedItems=_params$selectedItems===void 0?[]:_params$selectedItems,_params$items=params.items,items=_params$items===void 0?[]:_params$items;var meta=Object.assign((0,_common.getMetaProps)(params,uri),{schema:rootSchema,selectedItems:selectedItems,items:items});var elements={"enum":Object.assign((0,_common.getElementsFieldPropsForEnum)(params,uri),{selectedItems:selectedItems,items:items})};return Object.assign(params,_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:meta,elements:elements}));}function getRenderParamsForAnyOf(rootSchema,values,params){var _params$parentUri2=params.parentUri,parentUri=_params$parentUri2===void 0?'#':_params$parentUri2,_params$uri2=params.uri,uri=_params$uri2===void 0?'#/':_params$uri2,_params$selectedItems2=params.selectedItems,selectedItems=_params$selectedItems2===void 0?[]:_params$selectedItems2,_params$items2=params.items,items=_params$items2===void 0?[]:_params$items2;var meta=Object.assign((0,_common.getMetaProps)(params,uri),{schema:rootSchema,selectedItems:selectedItems,items:items});var elements={anyOf:Object.assign((0,_common.getElementsFieldPropsForAnyOf)(params,uri),{selectedItems:selectedItems,items:items})};return Object.assign(params,_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:meta,elements:elements}));}function getRenderParamsForOneOf(rootSchema,values,params){var _params$parentUri3=params.parentUri,parentUri=_params$parentUri3===void 0?'#':_params$parentUri3,_params$uri3=params.uri,uri=_params$uri3===void 0?'#/':_params$uri3,_params$selectedItems3=params.selectedItems,selectedItems=_params$selectedItems3===void 0?[]:_params$selectedItems3,_params$items3=params.items,items=_params$items3===void 0?[]:_params$items3;var meta=Object.assign((0,_common.getMetaProps)(params,uri),{schema:rootSchema,selectedItems:selectedItems,items:items});var elements={oneOf:Object.assign((0,_common.getElementsFieldPropsForOneOf)(params,uri),{selectedItems:selectedItems,items:items})};return Object.assign(params,_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:meta,elements:elements}));}function getRenderParamsForAllOf(rootSchema,values,params){var _params$parentUri4=params.parentUri,parentUri=_params$parentUri4===void 0?'#':_params$parentUri4,_params$uri4=params.uri,uri=_params$uri4===void 0?'#/':_params$uri4;var meta=Object.assign((0,_common.getMetaProps)(params,uri),{schema:rootSchema});var elements={field:(0,_common.getElementsFieldPropsForAllOf)(params,uri)};return Object.assign(params,_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:meta,elements:elements}));}function getRenderParams(rootSchema,values,params){var _params$parentUri5=params.parentUri,parentUri=_params$parentUri5===void 0?'#':_params$parentUri5,_params$uri5=params.uri,uri=_params$uri5===void 0?'#/':_params$uri5,_params$fields=params.fields,fields=_params$fields===void 0?[]:_params$fields;var meta=Object.assign((0,_common.getMetaProps)(params,uri),{schema:rootSchema,parentUri:(0,_common.normaliseUri)(parentUri),uri:uri});var elements=Object.assign((0,_common.getElementsProps)(params,uri),{fields:fields});return Object.assign(params,_defineProperty({parentUri:parentUri,uri:uri},uri,{meta:meta,elements:elements}));}function transformNullForEnum(rootSchema,values,params){var _params$uri6=params.uri,uri=_params$uri6===void 0?'#/':_params$uri6;var _getMetaProps=(0,_common.getMetaProps)(params,uri),_getMetaProps$selecte=_getMetaProps.selectedItems,selectedItems=_getMetaProps$selecte===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps$selecte;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderNullForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNullForAnyOf(rootSchema,values,params){var _params$uri7=params.uri,uri=_params$uri7===void 0?'#/':_params$uri7;var _getMetaProps2=(0,_common.getMetaProps)(params,uri),_getMetaProps2$select=_getMetaProps2.selectedItems,selectedItems=_getMetaProps2$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps2$select;var _rootSchema$anyOf=rootSchema.anyOf,anyOf=_rootSchema$anyOf===void 0?[]:_rootSchema$anyOf;var items=anyOf.map((0,_transformSchema.mapTransformNullByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNullForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNullForOneOf(rootSchema,values,params){var _params$uri8=params.uri,uri=_params$uri8===void 0?'#/':_params$uri8;var _getMetaProps3=(0,_common.getMetaProps)(params,uri),_getMetaProps3$select=_getMetaProps3.selectedItems,selectedItems=_getMetaProps3$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps3$select;var _rootSchema$oneOf=rootSchema.oneOf,oneOf=_rootSchema$oneOf===void 0?[]:_rootSchema$oneOf;var items=oneOf.map((0,_transformSchema.mapTransformNullByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNullForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNullForAllOf(rootSchema,values,params){var _rootSchema$allOf=rootSchema.allOf,allOf=_rootSchema$allOf===void 0?[]:_rootSchema$allOf,rest=_objectWithoutProperties(rootSchema,_excluded);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderNullForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformNull(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformNullForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformNullForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformNullForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformNullForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderNull)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformBooleanForEnum(rootSchema,values,params){var _params$uri9=params.uri,uri=_params$uri9===void 0?'#/':_params$uri9;var _getMetaProps4=(0,_common.getMetaProps)(params,uri),_getMetaProps4$select=_getMetaProps4.selectedItems,selectedItems=_getMetaProps4$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps4$select;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderBooleanForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformBooleanForAnyOf(rootSchema,values,params){var _params$uri10=params.uri,uri=_params$uri10===void 0?'#/':_params$uri10;var _getMetaProps5=(0,_common.getMetaProps)(params,uri),_getMetaProps5$select=_getMetaProps5.selectedItems,selectedItems=_getMetaProps5$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps5$select;var _rootSchema$anyOf2=rootSchema.anyOf,anyOf=_rootSchema$anyOf2===void 0?[]:_rootSchema$anyOf2;var items=anyOf.map((0,_transformSchema.mapTransformBooleanByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderBooleanForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformBooleanForOneOf(rootSchema,values,params){var _params$uri11=params.uri,uri=_params$uri11===void 0?'#/':_params$uri11;var _getMetaProps6=(0,_common.getMetaProps)(params,uri),_getMetaProps6$select=_getMetaProps6.selectedItems,selectedItems=_getMetaProps6$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps6$select;var _rootSchema$oneOf2=rootSchema.oneOf,oneOf=_rootSchema$oneOf2===void 0?[]:_rootSchema$oneOf2;var items=oneOf.map((0,_transformSchema.mapTransformBooleanByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderBooleanForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformBooleanForAllOf(rootSchema,values,params){var _rootSchema$allOf2=rootSchema.allOf,allOf=_rootSchema$allOf2===void 0?[]:_rootSchema$allOf2,rest=_objectWithoutProperties(rootSchema,_excluded2);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderBooleanForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformBoolean(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformBooleanForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformBooleanForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformBooleanForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformBooleanForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderBoolean)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformObjectForEnum(rootSchema,values,params){var _params$uri12=params.uri,uri=_params$uri12===void 0?'#/':_params$uri12;var _getMetaProps7=(0,_common.getMetaProps)(params,uri),_getMetaProps7$select=_getMetaProps7.selectedItems,selectedItems=_getMetaProps7$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps7$select;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderObjectForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformObjectForAnyOf(rootSchema,values,params){var _params$uri13=params.uri,uri=_params$uri13===void 0?'#/':_params$uri13;var _getMetaProps8=(0,_common.getMetaProps)(params,uri),_getMetaProps8$select=_getMetaProps8.selectedItems,selectedItems=_getMetaProps8$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps8$select;var _rootSchema$anyOf3=rootSchema.anyOf,anyOf=_rootSchema$anyOf3===void 0?[]:_rootSchema$anyOf3;var items=anyOf.map((0,_transformSchema.mapTransformObjectByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderObjectForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformObjectForOneOf(rootSchema,values,params){var _params$uri14=params.uri,uri=_params$uri14===void 0?'#/':_params$uri14;var _getMetaProps9=(0,_common.getMetaProps)(params,uri),_getMetaProps9$select=_getMetaProps9.selectedItems,selectedItems=_getMetaProps9$select===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps9$select;var _rootSchema$oneOf3=rootSchema.oneOf,oneOf=_rootSchema$oneOf3===void 0?[]:_rootSchema$oneOf3;var items=oneOf.map((0,_transformSchema.mapTransformObjectByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderObjectForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformObjectForAllOf(rootSchema,values,params){var _rootSchema$allOf3=rootSchema.allOf,allOf=_rootSchema$allOf3===void 0?[]:_rootSchema$allOf3,rest=_objectWithoutProperties(rootSchema,_excluded3);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderObjectForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformObject(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformObjectForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformObjectForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformObjectForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformObjectForAllOf(rootSchema,values,params);}}}}var _rootSchema$propertie=rootSchema.properties,properties=_rootSchema$propertie===void 0?{}:_rootSchema$propertie,_rootSchema$required=rootSchema.required,required=_rootSchema$required===void 0?[]:_rootSchema$required;var _params$uri15=params.uri,uri=_params$uri15===void 0?'#/':_params$uri15;var fields=Object.entries(properties).map((0,_transformSchema.mapTransformByKey)(rootSchema,values,Object.assign(params,{parentUri:uri,required:required})));return(0,_transformSchema.renderObject)(rootSchema,values,getRenderParams(rootSchema,values,Object.assign(params,{fields:fields})));}function transformArrayForEnum(rootSchema,values,params){var _params$uri16=params.uri,uri=_params$uri16===void 0?'#/':_params$uri16;var _getMetaProps10=(0,_common.getMetaProps)(params,uri),_getMetaProps10$selec=_getMetaProps10.selectedItems,selectedItems=_getMetaProps10$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps10$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderArrayForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformArrayForAnyOf(rootSchema,values,params){var _params$uri17=params.uri,uri=_params$uri17===void 0?'#/':_params$uri17;var _getMetaProps11=(0,_common.getMetaProps)(params,uri),_getMetaProps11$selec=_getMetaProps11.selectedItems,selectedItems=_getMetaProps11$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps11$selec;var _rootSchema$anyOf4=rootSchema.anyOf,anyOf=_rootSchema$anyOf4===void 0?[]:_rootSchema$anyOf4;var items=anyOf.map((0,_transformSchema.mapTransformArrayByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderArrayForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformArrayForOneOf(rootSchema,values,params){var _params$uri18=params.uri,uri=_params$uri18===void 0?'#/':_params$uri18;var _getMetaProps12=(0,_common.getMetaProps)(params,uri),_getMetaProps12$selec=_getMetaProps12.selectedItems,selectedItems=_getMetaProps12$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps12$selec;var _rootSchema$oneOf4=rootSchema.oneOf,oneOf=_rootSchema$oneOf4===void 0?[]:_rootSchema$oneOf4;var items=oneOf.map((0,_transformSchema.mapTransformArrayByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderArrayForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformArrayForAllOf(rootSchema,values,params){var _rootSchema$allOf4=rootSchema.allOf,allOf=_rootSchema$allOf4===void 0?[]:_rootSchema$allOf4,rest=_objectWithoutProperties(rootSchema,_excluded4);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderArrayForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformArray(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformArrayForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformArrayForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformArrayForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformArrayForAllOf(rootSchema,values,params);}}}}var _rootSchema$items=rootSchema.items,items=_rootSchema$items===void 0?[]:_rootSchema$items;if((0,_common.isArray)(items)){var fields=items.map((0,_transformSchema.mapTransformByIndex)(rootSchema,values,Object.assign(params,{parentUri:'#/'})));return(0,_transformSchema.renderArray)(rootSchema,values,getRenderParams(rootSchema,values,Object.assign(params,{fields:fields})));}else{if((0,_common.isObject)(items)){var _fields=[(0,_transformSchema.getTransformByIndex)(items,rootSchema,values,Object.assign(params,{parentUri:'#/'}))];return(0,_transformSchema.renderArray)(rootSchema,values,getRenderParams(rootSchema,values,Object.assign(params,{fields:_fields})));}}}function transformNumberForEnum(rootSchema,values,params){var _params$uri19=params.uri,uri=_params$uri19===void 0?'#/':_params$uri19;var _getMetaProps13=(0,_common.getMetaProps)(params,uri),_getMetaProps13$selec=_getMetaProps13.selectedItems,selectedItems=_getMetaProps13$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps13$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderNumberForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNumberForAnyOf(rootSchema,values,params){var _params$uri20=params.uri,uri=_params$uri20===void 0?'#/':_params$uri20;var _getMetaProps14=(0,_common.getMetaProps)(params,uri),_getMetaProps14$selec=_getMetaProps14.selectedItems,selectedItems=_getMetaProps14$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps14$selec;var _rootSchema$anyOf5=rootSchema.anyOf,anyOf=_rootSchema$anyOf5===void 0?[]:_rootSchema$anyOf5;var items=anyOf.map((0,_transformSchema.mapTransformNumberByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNumberForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNumberForOneOf(rootSchema,values,params){var _params$uri21=params.uri,uri=_params$uri21===void 0?'#/':_params$uri21;var _getMetaProps15=(0,_common.getMetaProps)(params,uri),_getMetaProps15$selec=_getMetaProps15.selectedItems,selectedItems=_getMetaProps15$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps15$selec;var _rootSchema$oneOf5=rootSchema.oneOf,oneOf=_rootSchema$oneOf5===void 0?[]:_rootSchema$oneOf5;var items=oneOf.map((0,_transformSchema.mapTransformNumberByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderNumberForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformNumberForAllOf(rootSchema,values,params){var _rootSchema$allOf5=rootSchema.allOf,allOf=_rootSchema$allOf5===void 0?[]:_rootSchema$allOf5,rest=_objectWithoutProperties(rootSchema,_excluded5);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderNumberForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformNumber(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformNumberForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformNumberForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformNumberForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformNumberForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderNumber)(rootSchema,values,getRenderParams(rootSchema,values,params));}function transformStringForEnum(rootSchema,values,params){var _params$uri22=params.uri,uri=_params$uri22===void 0?'#/':_params$uri22;var _getMetaProps16=(0,_common.getMetaProps)(params,uri),_getMetaProps16$selec=_getMetaProps16.selectedItems,selectedItems=_getMetaProps16$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps16$selec;var items=(0,_common.getEnum)(rootSchema);return(0,_transformSchema.renderStringForEnum)(rootSchema,values,getRenderParamsForEnum(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformStringForAnyOf(rootSchema,values,params){var _params$uri23=params.uri,uri=_params$uri23===void 0?'#/':_params$uri23;var _getMetaProps17=(0,_common.getMetaProps)(params,uri),_getMetaProps17$selec=_getMetaProps17.selectedItems,selectedItems=_getMetaProps17$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps17$selec;var _rootSchema$anyOf6=rootSchema.anyOf,anyOf=_rootSchema$anyOf6===void 0?[]:_rootSchema$anyOf6;var items=anyOf.map((0,_transformSchema.mapTransformStringByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderStringForAnyOf)(rootSchema,values,getRenderParamsForAnyOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformStringForOneOf(rootSchema,values,params){var _params$uri24=params.uri,uri=_params$uri24===void 0?'#/':_params$uri24;var _getMetaProps18=(0,_common.getMetaProps)(params,uri),_getMetaProps18$selec=_getMetaProps18.selectedItems,selectedItems=_getMetaProps18$selec===void 0?(0,_common.getSelectedItems)(values,uri):_getMetaProps18$selec;var _rootSchema$oneOf6=rootSchema.oneOf,oneOf=_rootSchema$oneOf6===void 0?[]:_rootSchema$oneOf6;var items=oneOf.map((0,_transformSchema.mapTransformStringByIndex)(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,parentUri:uri})));return(0,_transformSchema.renderStringForOneOf)(rootSchema,values,getRenderParamsForOneOf(rootSchema,values,Object.assign(params,{selectedItems:selectedItems,items:items})));}function transformStringForAllOf(rootSchema,values,params){var _rootSchema$allOf6=rootSchema.allOf,allOf=_rootSchema$allOf6===void 0?[]:_rootSchema$allOf6,rest=_objectWithoutProperties(rootSchema,_excluded6);var itemSchema=allOf.reduce(function(accumulator,schema){return Object.assign(accumulator,schema);},rest);return(0,_transformSchema.renderStringForAllOf)(itemSchema,values,getRenderParamsForAllOf(rootSchema,values,params));}function transformString(rootSchema,values,params){if((0,_common.hasEnum)(rootSchema)){return transformStringForEnum(rootSchema,values,params);}else{if((0,_common.hasAnyOf)(rootSchema)){return transformStringForAnyOf(rootSchema,values,params);}else{if((0,_common.hasOneOf)(rootSchema)){return transformStringForOneOf(rootSchema,values,params);}else{if((0,_common.hasAllOf)(rootSchema)){return transformStringForAllOf(rootSchema,values,params);}}}}return(0,_transformSchema.renderString)(rootSchema,values,getRenderParams(rootSchema,values,params));}function toZashiki(){var rootSchema=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var values=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};log('toZashiki');var type=rootSchema.type;switch(type){case'null':return transformNull(rootSchema,values,params);case'boolean':return transformBoolean(rootSchema,values,params);case'object':return transformObject(rootSchema,values,params);case'array':return transformArray(rootSchema,values,params);case'number':return transformNumber(rootSchema,values,params);case'string':return transformString(rootSchema,values,params);default:throw new Error('Schema does not conform to Instance Data Model, https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2.1');}}