@decaf-ts/decorator-validation 1.0.7 → 1.0.12

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 (141) hide show
  1. package/dist/decorator-validation.bundle.min.js +1 -1
  2. package/dist/esm/decorator-validation.bundle.min.esm.js +1 -1
  3. package/lib/esm/index.d.ts +6 -1
  4. package/lib/esm/index.js +68 -1
  5. package/lib/esm/model/Model.d.ts +3 -1
  6. package/lib/esm/model/Model.js +316 -1
  7. package/lib/esm/model/ModelErrorDefinition.d.ts +1 -1
  8. package/lib/esm/model/ModelErrorDefinition.js +55 -3
  9. package/lib/esm/model/Registry.d.ts +1 -1
  10. package/lib/esm/model/Registry.js +76 -1
  11. package/lib/esm/model/constants.js +44 -1
  12. package/lib/esm/model/construction.js +124 -1
  13. package/lib/esm/model/decorators.d.ts +3 -3
  14. package/lib/esm/model/decorators.js +68 -1
  15. package/lib/esm/model/index.d.ts +3 -3
  16. package/lib/esm/model/index.js +9 -1
  17. package/lib/esm/model/types.js +3 -0
  18. package/lib/esm/reflection/decorators.d.ts +15 -0
  19. package/lib/esm/reflection/decorators.js +28 -0
  20. package/lib/esm/reflection/index.d.ts +2 -0
  21. package/lib/esm/reflection/index.js +4 -0
  22. package/lib/esm/{utils/general.d.ts → reflection/utils.d.ts} +7 -87
  23. package/lib/esm/reflection/utils.js +239 -0
  24. package/lib/esm/utils/constants.js +25 -1
  25. package/lib/esm/utils/dates.d.ts +76 -0
  26. package/lib/esm/utils/dates.js +241 -0
  27. package/lib/esm/utils/equality.d.ts +14 -0
  28. package/lib/esm/utils/equality.js +34 -0
  29. package/lib/esm/utils/hashing.d.ts +42 -0
  30. package/lib/esm/utils/hashing.js +73 -0
  31. package/lib/esm/utils/index.d.ts +6 -2
  32. package/lib/esm/utils/index.js +10 -1
  33. package/lib/esm/utils/registry.js +3 -0
  34. package/lib/esm/utils/serialization.js +53 -1
  35. package/lib/esm/utils/strings.d.ts +25 -0
  36. package/lib/esm/utils/strings.js +31 -0
  37. package/lib/esm/validation/Validation.d.ts +2 -1
  38. package/lib/esm/validation/Validation.js +63 -1
  39. package/lib/esm/validation/Validators/DateValidator.js +55 -1
  40. package/lib/esm/validation/Validators/EmailValidator.d.ts +0 -1
  41. package/lib/esm/validation/Validators/EmailValidator.js +49 -1
  42. package/lib/esm/validation/Validators/ListValidator.js +67 -1
  43. package/lib/esm/validation/Validators/MaxLengthValidator.js +55 -1
  44. package/lib/esm/validation/Validators/MaxValidator.js +59 -1
  45. package/lib/esm/validation/Validators/MinLengthValidator.js +55 -1
  46. package/lib/esm/validation/Validators/MinValidator.js +59 -1
  47. package/lib/esm/validation/Validators/PasswordValidator.js +52 -1
  48. package/lib/esm/validation/Validators/PatternValidator.d.ts +3 -3
  49. package/lib/esm/validation/Validators/PatternValidator.js +72 -1
  50. package/lib/esm/validation/Validators/RequiredValidator.js +57 -1
  51. package/lib/esm/validation/Validators/StepValidator.js +54 -1
  52. package/lib/esm/validation/Validators/TypeValidator.js +42 -1
  53. package/lib/esm/validation/Validators/URLValidator.d.ts +0 -1
  54. package/lib/esm/validation/Validators/URLValidator.js +48 -1
  55. package/lib/esm/validation/Validators/Validator.js +50 -1
  56. package/lib/esm/validation/Validators/ValidatorRegistry.js +81 -1
  57. package/lib/esm/validation/Validators/constants.d.ts +8 -4
  58. package/lib/esm/validation/Validators/constants.js +135 -1
  59. package/lib/esm/validation/Validators/decorators.d.ts +13 -0
  60. package/lib/esm/validation/Validators/decorators.js +23 -0
  61. package/lib/esm/validation/Validators/index.d.ts +9 -7
  62. package/lib/esm/validation/Validators/index.js +54 -1
  63. package/lib/esm/validation/Validators/types.d.ts +2 -2
  64. package/lib/esm/validation/Validators/types.js +3 -0
  65. package/lib/esm/validation/decorators.d.ts +14 -87
  66. package/lib/esm/validation/decorators.js +320 -1
  67. package/lib/esm/validation/index.d.ts +1 -10
  68. package/lib/esm/validation/index.js +6 -1
  69. package/lib/esm/validation/types.d.ts +11 -0
  70. package/lib/esm/validation/types.js +3 -0
  71. package/lib/index.cjs +85 -1
  72. package/lib/index.d.ts +6 -1
  73. package/lib/model/Model.cjs +321 -1
  74. package/lib/model/Model.d.ts +3 -1
  75. package/lib/model/ModelErrorDefinition.cjs +59 -3
  76. package/lib/model/ModelErrorDefinition.d.ts +1 -1
  77. package/lib/model/Registry.cjs +81 -1
  78. package/lib/model/Registry.d.ts +1 -1
  79. package/lib/model/constants.cjs +47 -1
  80. package/lib/model/construction.cjs +129 -1
  81. package/lib/model/decorators.cjs +73 -1
  82. package/lib/model/decorators.d.ts +3 -3
  83. package/lib/model/index.cjs +25 -1
  84. package/lib/model/index.d.ts +3 -3
  85. package/lib/model/types.cjs +4 -1
  86. package/lib/reflection/decorators.cjs +31 -0
  87. package/lib/reflection/decorators.d.ts +15 -0
  88. package/lib/reflection/index.cjs +20 -0
  89. package/lib/reflection/index.d.ts +2 -0
  90. package/lib/reflection/utils.cjs +251 -0
  91. package/lib/{utils/general.d.ts → reflection/utils.d.ts} +7 -87
  92. package/lib/utils/constants.cjs +28 -1
  93. package/lib/utils/dates.cjs +249 -0
  94. package/lib/utils/dates.d.ts +76 -0
  95. package/lib/utils/equality.cjs +37 -0
  96. package/lib/utils/equality.d.ts +14 -0
  97. package/lib/utils/hashing.cjs +78 -0
  98. package/lib/utils/hashing.d.ts +42 -0
  99. package/lib/utils/index.cjs +26 -1
  100. package/lib/utils/index.d.ts +6 -2
  101. package/lib/utils/registry.cjs +4 -1
  102. package/lib/utils/serialization.cjs +57 -1
  103. package/lib/utils/strings.cjs +35 -0
  104. package/lib/utils/strings.d.ts +25 -0
  105. package/lib/validation/Validation.cjs +67 -1
  106. package/lib/validation/Validation.d.ts +2 -1
  107. package/lib/validation/Validators/DateValidator.cjs +58 -1
  108. package/lib/validation/Validators/EmailValidator.cjs +52 -1
  109. package/lib/validation/Validators/EmailValidator.d.ts +0 -1
  110. package/lib/validation/Validators/ListValidator.cjs +70 -1
  111. package/lib/validation/Validators/MaxLengthValidator.cjs +58 -1
  112. package/lib/validation/Validators/MaxValidator.cjs +62 -1
  113. package/lib/validation/Validators/MinLengthValidator.cjs +58 -1
  114. package/lib/validation/Validators/MinValidator.cjs +62 -1
  115. package/lib/validation/Validators/PasswordValidator.cjs +55 -1
  116. package/lib/validation/Validators/PatternValidator.cjs +75 -1
  117. package/lib/validation/Validators/PatternValidator.d.ts +3 -3
  118. package/lib/validation/Validators/RequiredValidator.cjs +60 -1
  119. package/lib/validation/Validators/StepValidator.cjs +57 -1
  120. package/lib/validation/Validators/TypeValidator.cjs +46 -1
  121. package/lib/validation/Validators/URLValidator.cjs +51 -1
  122. package/lib/validation/Validators/URLValidator.d.ts +0 -1
  123. package/lib/validation/Validators/Validator.cjs +54 -1
  124. package/lib/validation/Validators/ValidatorRegistry.cjs +86 -1
  125. package/lib/validation/Validators/constants.cjs +138 -1
  126. package/lib/validation/Validators/constants.d.ts +8 -4
  127. package/lib/validation/Validators/decorators.cjs +26 -0
  128. package/lib/validation/Validators/decorators.d.ts +13 -0
  129. package/lib/validation/Validators/index.cjs +71 -1
  130. package/lib/validation/Validators/index.d.ts +9 -7
  131. package/lib/validation/Validators/types.cjs +4 -1
  132. package/lib/validation/Validators/types.d.ts +2 -2
  133. package/lib/validation/decorators.cjs +337 -1
  134. package/lib/validation/decorators.d.ts +14 -87
  135. package/lib/validation/index.cjs +22 -1
  136. package/lib/validation/index.d.ts +1 -10
  137. package/lib/validation/types.cjs +4 -1
  138. package/lib/validation/types.d.ts +11 -0
  139. package/package.json +17 -13
  140. package/lib/esm/utils/general.js +0 -1
  141. package/lib/utils/general.cjs +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see decorator-validation.bundle.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("decorator-validation",[],t):"object"==typeof exports?exports["decorator-validation"]=t():e["decorator-validation"]=t()}(this,(()=>(()=>{var e={729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,a(r(935),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.validate=void 0;const n=r(965),a=r(935),i=r(19),o=r(402),s=r(154),c=r(38),u=r(936),d=r(770);function l(e,...t){const r=[];for(const i in e)e.hasOwnProperty(i)&&-1===t.indexOf(i)&&r.push((0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,i));const c=r.reduce(((t,r)=>{const{prop:i,decorators:c}=r;if(!c||!c.length)return t;const u=c[0];c.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===u.props.name))))&&c.shift();let l=c.reduce(((t,r)=>{const n=d.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[i.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return l=l||Object.keys(e).filter((e=>!l||!l[e])).reduce(((t,r)=>{let i;const c=(0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,u=c.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!u||!u.length)return t;const d=u.pop(),l=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(c.length&&c.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(i=(0,a.stringFormat)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(i=e[r].hasErrors())}catch(e){console.warn((0,a.stringFormat)("Model should be validatable but its not"))}}})),i&&((t=t||{})[r]=i),t}),void 0),l&&((t=t||{})[r.prop.toString()]=l),t}),void 0);return c?new i.ModelErrorDefinition(c):void 0}let f,y,p,h;t.validate=l;class g{constructor(e){}hasErrors(...e){return l(this,...e)}equals(e,...t){return(0,a.isEqual)(this,e,...t)}serialize(){return g.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return g.getHashingFunction()(this).toString()}static deserialize(e){return g.getSerializer().deserialize(e)}static serialize(e){return g.getSerializer().serialize(e)}static hash(e){return g.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){f=e}static getBuilder(){return f}static getRegistry(){return y||(y=new u.ModelRegistryManager),y}static setRegistry(e){y=e}static register(e,t){return g.getRegistry().register(e,t)}static get(e){return g.getRegistry().get(e)}static build(e={},t){return g.getRegistry().build(e,t)}static setSerializer(e){p=e}static getSerializer(){return p||(p=new a.JSONSerializer),p}static setHashingFunction(e){h=e}static getHashingFunction(){return h||(h=a.hashObj),h}}t.Model=g},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bulkModelRegister=t.ModelRegistryManager=void 0;const n=r(6),a=r(935),i=r(154);t.ModelRegistryManager=class{constructor(e=i.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,a.stringFormat)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}},t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))}},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.construct=t.constructFromModel=t.constructFromObject=void 0;const n=r(6),a=r(935),i=r(965),o=r(402),s=r(154);t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,c;for(const u in t)if(t.hasOwnProperty(u)&&(e.hasOwnProperty(u)||e.prototype&&e.prototype.hasOwnProperty(u))){if(e[u]=t[u],"object"!=typeof e[u])continue;if((0,a.isModel)(e[u])){try{e[u]=n.Model.build(e[u])}catch(e){console.log(e)}continue}const d=(0,a.getPropertyDecorators)(i.ValidationKeys.REFLECT,e,u).decorators;if(r=d.filter((e=>-1!==[s.ModelKeys.TYPE,i.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,a.stringFormat)("failed to find decorators for property {0}",u));c=r.pop();const l=c.props.name?[c.props.name]:Array.isArray(c.props.customTypes)?c.props.customTypes:[c.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===i.ValidationKeys.LIST));if(r&&("Array"===t&&(e[u]=e[u].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[u])t.add(n.Model.build(a,r.props.class));e[u]=t}}break;default:e[u]&&(e[u]=n.Model.build(e[u],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)}},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.model=t.getModelKey=void 0;const n=r(38),a=r(154),i=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e,t.model=function(e,r){return o=>{const s=function(...s){const c=(0,n.construct)(o,...s),u=i.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const d=Object.assign({},{class:o.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:d}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(d,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=o.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:o.prototype.constructor.name}),i.Model.register(s),s}}},847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(38),t),a(r(936),t),a(r(893),t),a(r(19),t),a(r(282),t),a(r(6),t),a(r(402),t)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},75:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=t.evaluateDesignTypes=t.checkTypes=t.checkType=t.getClassDecorators=t.isModel=t.hashObj=t.hashSerialization=t.hashCode=t.isEqual=t.stringFormat=t.getAllProperties=t.getAllPropertyDecorators=t.getTypeFromDecorator=t.getPropertyDecorators=void 0,r(630);const n=r(965),a=r(154),i=r(847);function o(e,t,r,n=!1,i=!0,u){const d=function(e,t,r,n=!1,i){const o=Reflect.getMetadataKeys(t,r).filter((t=>n?t.toString().startsWith(e):t===a.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((n,i)=>{const o={key:i!==a.ModelKeys.TYPE?i.substring(e.length):i,props:Reflect.getMetadata(i,t,r)};return n.concat(o)}),i||[]);return{prop:r.toString(),decorators:o}}(e,t,r,n,u);return i&&Object.getPrototypeOf(t)!==Object.prototype?o(e,Object.getPrototypeOf(t.constructor),r,!0,i,d.decorators):{prop:d.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?(c(e.props,r[e.key])||console.log(s("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(d.decorators)}}function s(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}function c(e,t,...r){if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e).filter((e=>-1===r.indexOf(e)));return n.length===Object.keys(t).filter((e=>-1===r.indexOf(e))).length&&n.every((n=>-1!==r.indexOf(n)||c(e[n],t[n],...r)))}function u(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function d(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function l(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function f(e,t){return!t.every((t=>!l(e,t)))}t.getPropertyDecorators=o,t.getTypeFromDecorator=function(e,t){const r=o(a.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const n=r.decorators.shift(),i=n.props?n.props.name:void 0;return"Function"!==i?i:void 0},t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const i=o(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,i.decorators)})),r)),void 0)},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const i=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(i());return n},t.stringFormat=s,t.isEqual=c,t.hashCode=u,t.hashSerialization=function(e){return u(i.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):(e=((e=e||0)<<5)-e+r)&e},r=u,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return"number"==typeof a?Math.abs(a):a},t.isModel=function(e){return!!e[a.ModelKeys.ANCHOR]||!!d(a.ModelKeys.REFLECT,e).find((e=>e.key===a.ModelKeys.MODEL&&e.props&&e.props.class))},t.getClassDecorators=d,t.checkType=l,t.checkTypes=f,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return l(e,t);case"object":return!Array.isArray(t)||f(e,t);case"function":return!t.name||"Object"===t.name||l(e,t.name);default:return!0}},t.dateFromFormat=function(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const i=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},o=i(a.groups.year),s=i(a.groups.day),c=a.groups.ampm;let u=i(a.groups.hour);c&&(u="PM"===c?u+12:u);const d=i(a.groups.minutes),l=i(a.groups.seconds),f=i(a.groups.milis),y=a.groups.monthname,p=a.groups.monthnamesmall;let h=a.groups.month;if(y)h=n.MONTH_NAMES.indexOf(y);else if(p){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(p.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=i(`${h}`);return new Date(o,h-1,s,u,d,l,f)}},935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(75),t),a(r(904),t),a(r(973),t),a(r(154),t)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(493),a=r(935);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new n.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.DATE){super(a.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}}t.DateValidator=i},335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.emailPat=/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/}constructor(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){super(n.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,i.emailPat,t)}}t.EmailValidator=i},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.LIST){super(a.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}}t.ListValidator=i},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(a.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}}t.MaxLengthValidator=i},909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX){super(a.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}}t.MaxValidator=i},519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(a.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}}t.MinLengthValidator=i},651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN){super(a.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}}t.MinValidator=i},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const n=r(273),a=r(772);class i extends n.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PASSWORD,t=a.PasswordPatterns.CHAR8_ONE_OF_EACH){super(a.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}}t.PasswordValidator=i},273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{static{this.regexpParser=new RegExp("^/(.+)/([gimus]*)$")}constructor(e=a.ValidationKeys.PATTERN,t=a.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}static getPattern(e){if(!i.regexpParser.test(e))return new RegExp(e);const t=e.match(i.regexpParser);return new RegExp(t[1],t[2])}hasErrors(e,t,r){if(e)return(t="string"==typeof t?i.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}t.PatternValidator=i},812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.REQUIRED){super(a.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}}t.RequiredValidator=i},553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.STEP){super(a.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}}t.StepValidator=i},375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(735),a=r(935),i=r(772),o=r(154);class s extends n.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,a.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.urlPattern=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i}constructor(e=n.DEFAULT_ERROR_MESSAGES.URL){super(n.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,i.urlPattern,t)}}t.URLValidator=i},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(935),a=r(772);t.Validator=class{constructor(e,t=a.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,n.stringFormat)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,n.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(a.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=t.isValidator=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPatterns=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.PasswordPatterns={CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}},493:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const i=r(395),o=r(375),s=r(116),c=r(553),u=r(964),d=r(273),l=r(651),f=r(519),y=r(909),p=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(735),t),a(r(168),t),a(r(436),t),a(r(335),t),a(r(812),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(273),t),a(r(964),t),a(r(553),t),a(r(395),t),a(r(375),t),a(r(116),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:p.MaxLengthValidator,MaxValidator:y.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:l.MinValidator,PatternValidator:d.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:i.DateValidator,TypeValidator:o.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.set=t.list=t.password=t.date=t.parseDate=t.formatDate=t.twoDigitPad=t.isValidDate=t.bindDateToString=t.type=t.url=t.email=t.pattern=t.maxlength=t.minlength=t.step=t.max=t.min=t.required=t.getValidationKey=void 0,r(630);const n=r(493),a=r(493),i=r(935),o=r(407),s=r(770);function c(e){return n.ValidationKeys.REFLECT+e}function u(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE,r=a.TypeValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.TYPE),{customTypes:e,message:t},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.TYPE,save:!0})}}function d(e,t){if(!e)return;const r=()=>y(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function l(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function f(e){return e<10?"0"+e:e.toString()}function y(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),i=e.getFullYear(),o=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=o%12,l=f(d),y=f(o),p=f(s),h=f(c),g=o<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),M=f(r),_=a+1,m=f(_),O=n.MONTH_NAMES[a],b=O.substr(0,3),S=i+"",R=S.substr(2,2);return(t=t.replace("hh",l).replace("h",d.toString()).replace("HH",y).replace("H",o.toString()).replace("mm",p).replace("m",s.toString()).replace("ss",h).replace("s",c.toString()).replace("S",u.toString()).replace("dd",M).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",S).replace("yy",R).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",_.toString())}function p(e,t){let r;if(t){if(t instanceof Date)try{r=(0,i.dateFromFormat)(y(t,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=(0,i.dateFromFormat)(t,e);else if("number"==typeof t){const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}else{if(!l(t))throw new Error(`Invalid value provided ${t}`);try{const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t,e))}}return d(r,e)}}function h(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST,a=o.ListValidator){return(i,o)=>{u(t)(i,o),Reflect.defineMetadata(c(n.ValidationKeys.LIST),{class:e.name,type:t,message:r},i,o),s.Validation.register({validator:a,validationKey:n.ValidationKeys.LIST,save:!0})}}t.getValidationKey=c,t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED,t=a.RequiredValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.REQUIRED),{message:e},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.REQUIRED,save:!0})}},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN,r=a.MinValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN,save:!0})}},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX,r=a.MaxValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX,save:!0})}},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP,r=a.StepValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.STEP,save:!0})}},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH,r=a.MinLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN_LENGTH,save:!0})}},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH,r=a.MaxLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX_LENGTH,save:!0})}},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN,r=a.PatternValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PATTERN,save:!0})}},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL,t=a.EmailValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.EMAIL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.EMAIL,save:!0})}},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL,t=a.URLValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.URL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.URL,save:!0})}},t.type=u,t.bindDateToString=d,t.isValidDate=l,t.twoDigitPad=f,t.formatDate=y,t.parseDate=p,t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE,r=a.DateValidator){return(a,o)=>{Reflect.defineMetadata(c(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},a,o),s.Validation.register({validator:r,validationKey:n.ValidationKeys.DATE,save:!0});const u=new WeakMap;Object.defineProperty(a,o,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,o);r&&!r.configurable||Object.defineProperty(this,o,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=p(e,t),u.set(this,r)}catch(e){console.error((0,i.stringFormat)("Failed to parse date: {0}",e.message||e))}}}),this[o]=t},get(){console.log("here")}})}},t.password=function(e=n.PasswordPatterns.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD,r=a.PasswordValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PASSWORD,save:!0})}},t.list=h,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{h(e,"Set",t,r)(n,a)}}},965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Decorators=t.ValidatorRegistryImp=void 0,a(r(792),t),a(r(493),t);const i=r(493);t.ValidatorRegistryImp=i.ValidatorRegistry,t.Decorators=r(475),a(r(475),t),a(r(770),t)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),a=i(e);function i(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==n.Reflect&&(a=i(n.Reflect,a)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!o&&!s,u={create:o?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},d=Object.getPrototypeOf(Function),l="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,K(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function o(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}(),y="function"==typeof WeakMap?WeakMap:function(){var e=16,t=u.create(),n=a();return function(){function e(){this._key=a()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=a()},e}();function a(){var e;do{e="@@WeakMap@@"+s()}while(u.has(t,e));return t[e]=!0,e}function i(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:u.create()})}return e[n]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function s(){var t,r=(t=e,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));r[6]=79&r[6]|64,r[8]=191&r[8]|128;for(var n="",a=0;a<e;++a){var i=r[a];4!==a&&6!==a&&8!==a||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[p]),R(e)&&(e=function(){var e,r,n,a;R(p)||void 0===t.Reflect||p in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,i=e.deleteMetadata,o=new y;return{isProviderFor:function(e,t){var r=o.get(e);return R(r)?!!a(e,t).length&&(R(r)&&(r=new f,o.set(e,r)),r.add(t),!0):r.has(t)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new y,o={registerProvider:s,getProvider:u,setProvider:h};return o;function s(t){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case R(r):r=t;break;case r===t:break;case R(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,i){if(!R(r)){if(r.isProviderFor(t,i))return r;if(!R(n)){if(n.isProviderFor(t,i))return r;if(!R(a))for(var o=F(a);;){var s=k(o);if(!s)return;var c=x(s);if(c.isProviderFor(t,i))return I(o),c}}}if(!R(e)&&e.isProviderFor(t,i))return e}function u(e,t){var r,n=i.get(e);return R(n)||(r=n.get(t)),R(r)?(R(r=c(e,t))||(R(n)&&(n=new l,i.set(e,n)),n.set(t,r)),r):r}function d(e){if(R(e))throw new TypeError;return r===e||n===e||!R(a)&&a.has(e)}function h(e,t,r){if(!d(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var a=i.get(e);R(a)&&(a=new l,i.set(e,a)),a.set(t,r)}return!0}}()),!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new y,r={isProviderFor:function(e,r){var n=t.get(e);return!R(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!R(a)&&P(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!R(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(R(a))return r;for(var i=F(a.keys()),o=0;;){var s=k(i);if(!s)return r.length=o,r;var c=x(s);try{r[o]=c}catch(e){try{I(i)}finally{throw e}}o++}},OrdinaryDeleteMetadata:function(e,r,a){var i=n(r,a,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var o=t.get(r);R(o)||(o.delete(a),0===o.size&&t.delete(o))}return!0}};return h.registerProvider(r),r;function n(n,a,i){var o=t.get(n),s=!1;if(R(o)){if(!i)return;o=new l,t.set(n,o),s=!0}var c=o.get(a);if(R(c)){if(!i)return;if(c=new l,o.set(a,c),!e.setProvider(n,a,r))throw o.delete(a),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!R(n)&&P(n.OrdinaryHasOwnMetadata(e,t,r))}function M(e,t,r){if(E(e,t,r))return _(e,t,r);var n=U(t);return w(n)?void 0:M(e,n,r)}function _(e,t,r){var n=G(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var i=new f,o=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),o.push(u))}for(var d=0,l=a;d<l.length;d++)u=l[d],i.has(u)||(i.add(u),o.push(u));return o}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function S(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function R(e){return void 0===e}function w(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function A(e,t){switch(S(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=N(e,a);if(void 0!==n){var i=n.call(e,r);if(T(i))throw new TypeError;return i}return function(e,t){if("string"===t){var r=e.toString;if(j(r)&&!T(a=r.call(e)))return a;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a}else{var n;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a;var a,i=e.toString;if(j(i)&&!T(a=i.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function P(e){return!!e}function V(e){var t=A(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function D(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function j(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!j(r))throw new TypeError;return r}}function F(e){var t=N(e,i);if(!j(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function x(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!R(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(R(r)){if(!D(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!R(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!D(e))throw new TypeError;if(!T(t))throw new TypeError;if(!T(n)&&!R(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var i=(0,e[a])(t,r,n);if(!R(i)&&!w(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=V(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(S(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=V(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),M(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),_(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=V(r)),!T(t))throw new TypeError;R(r)||(r=V(r));var n=G(t,r,!1);return!R(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(a,n),void 0===n.Reflect&&(n.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("decorator-validation",[],t):"object"==typeof exports?exports["decorator-validation"]=t():e["decorator-validation"]=t()}(this,(()=>(()=>{var e={729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,o(r(935),t),o(r(839),t),o(r(965),t),o(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),o=r(735),a=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const o in e)e.hasOwnProperty(o)&&-1===t.indexOf(o)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,o));const o=r.reduce(((t,r)=>{const{prop:o,decorators:a}=r;if(!a||!a.length)return t;const c=a[0];a.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&a.shift();let u=a.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[o.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let o;const a=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=a.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(a.length&&a.find((e=>e.key===n.ValidationKeys.LIST))){const a="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));a&&(o=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,a.toString()))}break;default:try{e[r]&&(o=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),o&&((t=t||{})[r]=o),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return o?new a.ModelErrorDefinition(o):void 0}let g,v,E,_;class M{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return M.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return M.getHashingFunction()(this).toString()}static deserialize(e){return M.getSerializer().deserialize(e)}static serialize(e){return M.getSerializer().serialize(e)}static hash(e){return M.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return M.getRegistry().register(e,t)}static get(e){return M.getRegistry().get(e)}static build(e={},t){return M.getRegistry().build(e,t)}static setSerializer(e){E=e}static getSerializer(){return E||(E=new o.JSONSerializer),E}static setHashingFunction(e){_=e}static getHashingFunction(){return _||(_=f.hashObj),_}}t.Model=M},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),o=r(154),a=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=o.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(o.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,o.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(a.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===o.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const o of e[l])t.add(n.Model.build(o,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),o=r(772),a=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=a.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,o.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(o.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),a.Model.register(s),s}};const n=r(38),o=r(154),a=r(6);t.getModelKey=e=>o.ModelKeys.REFLECT+e},847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(402),t),o(r(38),t),o(r(893),t),o(r(6),t),o(r(19),t),o(r(936),t),o(r(282),t)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,o)=>{o?Reflect.defineMetadata(e,t,o.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},r(630)},839:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(501),t),o(r(174),t)},174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const o=r.decorators.shift(),a=o.props?o.props.name:void 0;return"Function"!==a?a:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let o=e;const a=function(){if(!t)return;const e=Object.getPrototypeOf(o);return e&&e.constructor.name!==r?(o=e,o):void 0};do{Object.getOwnPropertyNames(o).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(a());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),o=r(593),a=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,o=!1,a){const i=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((o,a)=>{const i={key:a!==n.ModelKeys.TYPE?a.substring(e.length):a,props:Reflect.getMetadata(a,t,r)};return o.concat(i)}),a||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,a.isEqual)(e.props,r[e.key])||console.log((0,o.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const o={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(o)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,o)=>{const a=i(t,e,n,0!==o);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,a.decorators)})),r)),void 0)}},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=a,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=a(u(t,e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=a(t,e);else if("number"==typeof t)r=a(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=a(u(new Date(t),e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),o=r(593);function a(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const o=new RegExp(r,"g").exec(e);if(!o||!o.groups)return new Date(e);const a=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=a(o.groups.year),s=a(o.groups.day),c=o.groups.ampm;let u=a(o.groups.hour);c&&(u="PM"===c?u+12:u);const l=a(o.groups.minutes),d=a(o.groups.seconds),f=a(o.groups.milis),p=o.groups.monthname,y=o.groups.monthnamesmall;let h=o.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=a(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),o=e.getMonth(),a=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),_=c(r),M=o+1,m=c(M),O=n.MONTH_NAMES[o],b=O.substr(0,3),R=a+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",_).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",M.toString())}},687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const o=Object.keys(t).filter((e=>-1===n.indexOf(e)));return o.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&o.every((o=>-1!==n.indexOf(o)||e(t[o],r[o],...n)))}},523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=o,t.hashSerialization=function(e){return o(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=o,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return"number"==typeof a?Math.abs(a):a};const n=r(6);function o(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(154),t),o(r(46),t),o(r(687),t),o(r(523),t),o(r(735),t),o(r(904),t),o(r(735),t),o(r(593),t)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),o=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[o.ModelKeys.ANCHOR]=e[o.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{"use strict";function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(375),o=r(436),a=r(154);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new o.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(i.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),o("design:paramtypes",[String])],c)},335:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.EMAIL){super(a.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(a.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},407:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(i.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let o=0;o<(Array.isArray(e)?e.length:e.size);o++)switch(n=e[o],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),o("design:paramtypes",[String])],c)},169:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(i.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),o("design:paramtypes",[String])],c)},909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(i.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),o("design:paramtypes",[String])],c)},519:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(i.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),o("design:paramtypes",[String])],c)},651:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(i.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),o("design:paramtypes",[String])],c)},354:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const a=r(273),i=r(772),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(i.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),o("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const a=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends a.Validator{constructor(e=i.ValidationKeys.PATTERN,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),o("design:paramtypes",[String,String])],c)},812:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(i.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),o("design:paramtypes",[String])],c)},553:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(i.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),o("design:paramtypes",[String])],c)},375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(116),o=r(772),a=r(154),i=r(174);class s extends n.Validator{constructor(e=o.DEFAULT_ERROR_MESSAGES.TYPE){super(a.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,i.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.URL){super(a.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(a.ValidationKeys.URL),o("design:paramtypes",[String])],c)},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),a=r(174);t.Validator=class{constructor(e,t=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,o.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,a.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const o={};o[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,o)}}))}}},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(e){return t=>(n.Validation.register({validator:t,validationKey:e,save:!0}),t)};const n=r(770)},493:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const a=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);o(r(772),t),o(r(395),t),o(r(787),t),o(r(335),t),o(r(407),t),o(r(169),t),o(r(909),t),o(r(519),t),o(r(651),t),o(r(354),t),o(r(273),t),o(r(812),t),o(r(553),t),o(r(168),t),o(r(375),t),o(r(964),t),o(r(116),t),o(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:a.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=l,t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,a.metadata)(l(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,a.metadata)(l(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,a.metadata)(l(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,a.metadata)(l(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,a.metadata)(l(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,a.metadata)(l(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,a.metadata)(l(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,a.metadata)(l(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,a.metadata)(l(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata(l(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const o=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>o.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),o.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,a)=>{Reflect.defineMetadata(l(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,a),o.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,o)=>{f(e,"Set",t,r)(n,o)}},r(630);const n=r(407),o=r(770),a=r(501),i=r(772),s=r(593),c=r(354),u=r(935);function l(e){return i.ValidationKeys.REFLECT+e}function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,a.metadata)(l(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,a=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata(l(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),o.Validation.register({validator:a,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(493),t),o(r(475),t),o(r(792),t),o(r(770),t)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=o(e);function o(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=o(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,N(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!N(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(N(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function o(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):a(t,e),t}return a(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,o;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,o=e.getOwnMetadataKeys,a=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!o(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:a}}(t.Reflect));var a=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===o&&(o=new f),o.add(t)}}function c(t,a){if(!S(r)){if(r.isProviderFor(t,a))return r;if(!S(n)){if(n.isProviderFor(t,a))return r;if(!S(o))for(var i=x(o);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,a))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,a))return e}function u(e,t){var r,n=a.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,a.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(o)&&o.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var o=a.get(e);S(o)&&(o=new d,a.set(e,o)),o.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,o){n(r,o,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var o=n(t,r,!1);return!S(o)&&A(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(S(o))return r;for(var a=x(o.keys()),i=0;;){var s=k(a);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(a)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,o){var a=n(r,o,!1);if(S(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var i=t.get(r);S(i)||(i.delete(o),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,o,a){var i=t.get(n),s=!1;if(S(i)){if(!a)return;i=new d,t.set(n,i),s=!0}var c=i.get(o);if(S(c)){if(!a)return;if(c=new d,i.set(o,c),!e.setProvider(n,o,r))throw i.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function _(e,t,r){if(E(e,t,r))return M(e,t,r);var n=U(t);return w(n)?void 0:_(e,n,r)}function M(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var o=O(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];a.has(u)||(a.add(u),i.push(u))}for(var l=0,d=o;l<d.length;l++)u=d[l],a.has(u)||(a.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=K(e,o);if(void 0!==n){var a=n.call(e,r);if(P(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(o=r.call(e)))return o;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o}else{var n;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o;var o,a=e.toString;if(D(a)&&!P(o=a.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function N(e,t){return e===t||e!=e&&t!=t}function K(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=K(e,a);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var o=n.constructor;return"function"!=typeof o||o===e?t:o}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var a=(0,e[o])(t,r,n);if(!S(a)&&!w(a)){if(!P(a))throw new TypeError;n=a}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),M(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729)})()));
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see decorator-validation.bundle.min.esm.js.LICENSE.txt */
2
- var e={729:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,a(r(935),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.validate=void 0;const n=r(965),a=r(935),i=r(19),o=r(402),s=r(154),c=r(38),u=r(936),d=r(770);function l(e,...t){const r=[];for(const i in e)e.hasOwnProperty(i)&&-1===t.indexOf(i)&&r.push((0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,i));const c=r.reduce(((t,r)=>{const{prop:i,decorators:c}=r;if(!c||!c.length)return t;const u=c[0];c.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===u.props.name))))&&c.shift();let l=c.reduce(((t,r)=>{const n=d.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[i.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return l=l||Object.keys(e).filter((e=>!l||!l[e])).reduce(((t,r)=>{let i;const c=(0,a.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,u=c.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!u||!u.length)return t;const d=u.pop(),l=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(c.length&&c.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(i=(0,a.stringFormat)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(i=e[r].hasErrors())}catch(e){console.warn((0,a.stringFormat)("Model should be validatable but its not"))}}})),i&&((t=t||{})[r]=i),t}),void 0),l&&((t=t||{})[r.prop.toString()]=l),t}),void 0);return c?new i.ModelErrorDefinition(c):void 0}let f,y,p,h;t.validate=l;class g{constructor(e){}hasErrors(...e){return l(this,...e)}equals(e,...t){return(0,a.isEqual)(this,e,...t)}serialize(){return g.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return g.getHashingFunction()(this).toString()}static deserialize(e){return g.getSerializer().deserialize(e)}static serialize(e){return g.getSerializer().serialize(e)}static hash(e){return g.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){f=e}static getBuilder(){return f}static getRegistry(){return y||(y=new u.ModelRegistryManager),y}static setRegistry(e){y=e}static register(e,t){return g.getRegistry().register(e,t)}static get(e){return g.getRegistry().get(e)}static build(e={},t){return g.getRegistry().build(e,t)}static setSerializer(e){p=e}static getSerializer(){return p||(p=new a.JSONSerializer),p}static setHashingFunction(e){h=e}static getHashingFunction(){return h||(h=a.hashObj),h}}t.Model=g},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bulkModelRegister=t.ModelRegistryManager=void 0;const n=r(6),a=r(935),i=r(154);t.ModelRegistryManager=class{constructor(e=i.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,a.stringFormat)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}},t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))}},402:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.construct=t.constructFromModel=t.constructFromObject=void 0;const n=r(6),a=r(935),i=r(965),o=r(402),s=r(154);t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,c;for(const u in t)if(t.hasOwnProperty(u)&&(e.hasOwnProperty(u)||e.prototype&&e.prototype.hasOwnProperty(u))){if(e[u]=t[u],"object"!=typeof e[u])continue;if((0,a.isModel)(e[u])){try{e[u]=n.Model.build(e[u])}catch(e){console.log(e)}continue}const d=(0,a.getPropertyDecorators)(i.ValidationKeys.REFLECT,e,u).decorators;if(r=d.filter((e=>-1!==[s.ModelKeys.TYPE,i.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,a.stringFormat)("failed to find decorators for property {0}",u));c=r.pop();const l=c.props.name?[c.props.name]:Array.isArray(c.props.customTypes)?c.props.customTypes:[c.props.customTypes],f=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===i.ValidationKeys.LIST));if(r&&("Array"===t&&(e[u]=e[u].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[u])t.add(n.Model.build(a,r.props.class));e[u]=t}}break;default:e[u]&&(e[u]=n.Model.build(e[u],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)}},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.model=t.getModelKey=void 0;const n=r(38),a=r(154),i=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e,t.model=function(e,r){return o=>{const s=function(...s){const c=(0,n.construct)(o,...s),u=i.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const d=Object.assign({},{class:o.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:d}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(d,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=o.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:o.prototype.constructor.name}),i.Model.register(s),s}}},847:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(38),t),a(r(936),t),a(r(893),t),a(r(19),t),a(r(282),t),a(r(6),t),a(r(402),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},75:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=t.evaluateDesignTypes=t.checkTypes=t.checkType=t.getClassDecorators=t.isModel=t.hashObj=t.hashSerialization=t.hashCode=t.isEqual=t.stringFormat=t.getAllProperties=t.getAllPropertyDecorators=t.getTypeFromDecorator=t.getPropertyDecorators=void 0,r(630);const n=r(965),a=r(154),i=r(847);function o(e,t,r,n=!1,i=!0,u){const d=function(e,t,r,n=!1,i){const o=Reflect.getMetadataKeys(t,r).filter((t=>n?t.toString().startsWith(e):t===a.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((n,i)=>{const o={key:i!==a.ModelKeys.TYPE?i.substring(e.length):i,props:Reflect.getMetadata(i,t,r)};return n.concat(o)}),i||[]);return{prop:r.toString(),decorators:o}}(e,t,r,n,u);return i&&Object.getPrototypeOf(t)!==Object.prototype?o(e,Object.getPrototypeOf(t.constructor),r,!0,i,d.decorators):{prop:d.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?(c(e.props,r[e.key])||console.log(s("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(d.decorators)}}function s(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}function c(e,t,...r){if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e).filter((e=>-1===r.indexOf(e)));return n.length===Object.keys(t).filter((e=>-1===r.indexOf(e))).length&&n.every((n=>-1!==r.indexOf(n)||c(e[n],t[n],...r)))}function u(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function d(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function l(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function f(e,t){return!t.every((t=>!l(e,t)))}t.getPropertyDecorators=o,t.getTypeFromDecorator=function(e,t){const r=o(a.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const n=r.decorators.shift(),i=n.props?n.props.name:void 0;return"Function"!==i?i:void 0},t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const i=o(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,i.decorators)})),r)),void 0)},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const i=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(i());return n},t.stringFormat=s,t.isEqual=c,t.hashCode=u,t.hashSerialization=function(e){return u(i.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):(e=((e=e||0)<<5)-e+r)&e},r=u,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return"number"==typeof a?Math.abs(a):a},t.isModel=function(e){return!!e[a.ModelKeys.ANCHOR]||!!d(a.ModelKeys.REFLECT,e).find((e=>e.key===a.ModelKeys.MODEL&&e.props&&e.props.class))},t.getClassDecorators=d,t.checkType=l,t.checkTypes=f,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return l(e,t);case"object":return!Array.isArray(t)||f(e,t);case"function":return!t.name||"Object"===t.name||l(e,t.name);default:return!0}},t.dateFromFormat=function(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const i=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},o=i(a.groups.year),s=i(a.groups.day),c=a.groups.ampm;let u=i(a.groups.hour);c&&(u="PM"===c?u+12:u);const d=i(a.groups.minutes),l=i(a.groups.seconds),f=i(a.groups.milis),y=a.groups.monthname,p=a.groups.monthnamesmall;let h=a.groups.month;if(y)h=n.MONTH_NAMES.indexOf(y);else if(p){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(p.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=i(`${h}`);return new Date(o,h-1,s,u,d,l,f)}},935:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(75),t),a(r(904),t),a(r(973),t),a(r(154),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},973:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},770:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(493),a=r(935);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new n.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.DATE){super(a.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}}t.DateValidator=i},335:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.emailPat=/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/}constructor(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){super(n.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,i.emailPat,t)}}t.EmailValidator=i},407:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.LIST){super(a.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}}t.ListValidator=i},169:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(a.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}}t.MaxLengthValidator=i},909:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX){super(a.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}}t.MaxValidator=i},519:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(a.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}}t.MinLengthValidator=i},651:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN){super(a.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}}t.MinValidator=i},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const n=r(273),a=r(772);class i extends n.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PASSWORD,t=a.PasswordPatterns.CHAR8_ONE_OF_EACH){super(a.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}}t.PasswordValidator=i},273:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{static{this.regexpParser=new RegExp("^/(.+)/([gimus]*)$")}constructor(e=a.ValidationKeys.PATTERN,t=a.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}static getPattern(e){if(!i.regexpParser.test(e))return new RegExp(e);const t=e.match(i.regexpParser);return new RegExp(t[1],t[2])}hasErrors(e,t,r){if(e)return(t="string"==typeof t?i.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}t.PatternValidator=i},812:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.REQUIRED){super(a.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}}t.RequiredValidator=i},553:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const n=r(735),a=r(772);class i extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.STEP){super(a.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}}t.StepValidator=i},375:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(735),a=r(935),i=r(772),o=r(154);class s extends n.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,a.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const n=r(772),a=r(273);class i extends a.PatternValidator{static{this.urlPattern=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i}constructor(e=n.DEFAULT_ERROR_MESSAGES.URL){super(n.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,i.urlPattern,t)}}t.URLValidator=i},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(935),a=r(772);t.Validator=class{constructor(e,t=a.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,n.stringFormat)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,n.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(a.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=t.isValidator=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPatterns=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.PasswordPatterns={CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}},493:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const i=r(395),o=r(375),s=r(116),c=r(553),u=r(964),d=r(273),l=r(651),f=r(519),y=r(909),p=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(735),t),a(r(168),t),a(r(436),t),a(r(335),t),a(r(812),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(273),t),a(r(964),t),a(r(553),t),a(r(395),t),a(r(375),t),a(r(116),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:p.MaxLengthValidator,MaxValidator:y.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:l.MinValidator,PatternValidator:d.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:i.DateValidator,TypeValidator:o.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.set=t.list=t.password=t.date=t.parseDate=t.formatDate=t.twoDigitPad=t.isValidDate=t.bindDateToString=t.type=t.url=t.email=t.pattern=t.maxlength=t.minlength=t.step=t.max=t.min=t.required=t.getValidationKey=void 0,r(630);const n=r(493),a=r(493),i=r(935),o=r(407),s=r(770);function c(e){return n.ValidationKeys.REFLECT+e}function u(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE,r=a.TypeValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.TYPE),{customTypes:e,message:t},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.TYPE,save:!0})}}function d(e,t){if(!e)return;const r=()=>y(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function l(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function f(e){return e<10?"0"+e:e.toString()}function y(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),i=e.getFullYear(),o=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=o%12,l=f(d),y=f(o),p=f(s),h=f(c),g=o<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),M=f(r),_=a+1,m=f(_),O=n.MONTH_NAMES[a],b=O.substr(0,3),S=i+"",R=S.substr(2,2);return(t=t.replace("hh",l).replace("h",d.toString()).replace("HH",y).replace("H",o.toString()).replace("mm",p).replace("m",s.toString()).replace("ss",h).replace("s",c.toString()).replace("S",u.toString()).replace("dd",M).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",S).replace("yy",R).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",_.toString())}function p(e,t){let r;if(t){if(t instanceof Date)try{r=(0,i.dateFromFormat)(y(t,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=(0,i.dateFromFormat)(t,e);else if("number"==typeof t){const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}else{if(!l(t))throw new Error(`Invalid value provided ${t}`);try{const n=new Date(t);r=(0,i.dateFromFormat)(y(n,e),e)}catch(r){throw new Error((0,i.stringFormat)("Could not convert date {0} to format: {1}",t,e))}}return d(r,e)}}function h(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST,a=o.ListValidator){return(i,o)=>{u(t)(i,o),Reflect.defineMetadata(c(n.ValidationKeys.LIST),{class:e.name,type:t,message:r},i,o),s.Validation.register({validator:a,validationKey:n.ValidationKeys.LIST,save:!0})}}t.getValidationKey=c,t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED,t=a.RequiredValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.REQUIRED),{message:e},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.REQUIRED,save:!0})}},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN,r=a.MinValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN,save:!0})}},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX,r=a.MaxValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX,save:!0})}},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP,r=a.StepValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.STEP,save:!0})}},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH,r=a.MinLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MIN_LENGTH,save:!0})}},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH,r=a.MaxLengthValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.MAX_LENGTH,save:!0})}},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN,r=a.PatternValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PATTERN,save:!0})}},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL,t=a.EmailValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.EMAIL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.EMAIL,save:!0})}},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL,t=a.URLValidator){return(r,a)=>{Reflect.defineMetadata(c(n.ValidationKeys.URL),{message:e,types:[String.name]},r,a),s.Validation.register({validator:t,validationKey:n.ValidationKeys.URL,save:!0})}},t.type=u,t.bindDateToString=d,t.isValidDate=l,t.twoDigitPad=f,t.formatDate=y,t.parseDate=p,t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE,r=a.DateValidator){return(a,o)=>{Reflect.defineMetadata(c(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},a,o),s.Validation.register({validator:r,validationKey:n.ValidationKeys.DATE,save:!0});const u=new WeakMap;Object.defineProperty(a,o,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,o);r&&!r.configurable||Object.defineProperty(this,o,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=p(e,t),u.set(this,r)}catch(e){console.error((0,i.stringFormat)("Failed to parse date: {0}",e.message||e))}}}),this[o]=t},get(){console.log("here")}})}},t.password=function(e=n.PasswordPatterns.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD,r=a.PasswordValidator){return(a,i)=>{Reflect.defineMetadata(c(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},a,i),s.Validation.register({validator:r,validationKey:n.ValidationKeys.PASSWORD,save:!0})}},t.list=h,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{h(e,"Set",t,r)(n,a)}}},965:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Decorators=t.ValidatorRegistryImp=void 0,a(r(792),t),a(r(493),t);const i=r(493);t.ValidatorRegistryImp=i.ValidatorRegistry,t.Decorators=r(475),a(r(475),t),a(r(770),t)},792:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),a=i(e);function i(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==n.Reflect&&(a=i(n.Reflect,a)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!o&&!s,u={create:o?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},d=Object.getPrototypeOf(Function),l="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,K(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function o(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}(),y="function"==typeof WeakMap?WeakMap:function(){var e=16,t=u.create(),n=a();return function(){function e(){this._key=a()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=a()},e}();function a(){var e;do{e="@@WeakMap@@"+s()}while(u.has(t,e));return t[e]=!0,e}function i(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:u.create()})}return e[n]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function s(){var t,r=(t=e,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):o(new Uint8Array(t),t):o(new Array(t),t));r[6]=79&r[6]|64,r[8]=191&r[8]|128;for(var n="",a=0;a<e;++a){var i=r[a];4!==a&&6!==a&&8!==a||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}(),p=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[p]),R(e)&&(e=function(){var e,r,n,a;R(p)||void 0===t.Reflect||p in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,i=e.deleteMetadata,o=new y;return{isProviderFor:function(e,t){var r=o.get(e);return R(r)?!!a(e,t).length&&(R(r)&&(r=new f,o.set(e,r)),r.add(t),!0):r.has(t)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new y,o={registerProvider:s,getProvider:u,setProvider:h};return o;function s(t){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case R(r):r=t;break;case r===t:break;case R(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,i){if(!R(r)){if(r.isProviderFor(t,i))return r;if(!R(n)){if(n.isProviderFor(t,i))return r;if(!R(a))for(var o=F(a);;){var s=k(o);if(!s)return;var c=x(s);if(c.isProviderFor(t,i))return I(o),c}}}if(!R(e)&&e.isProviderFor(t,i))return e}function u(e,t){var r,n=i.get(e);return R(n)||(r=n.get(t)),R(r)?(R(r=c(e,t))||(R(n)&&(n=new l,i.set(e,n)),n.set(t,r)),r):r}function d(e){if(R(e))throw new TypeError;return r===e||n===e||!R(a)&&a.has(e)}function h(e,t,r){if(!d(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var a=i.get(e);R(a)&&(a=new l,i.set(e,a)),a.set(t,r)}return!0}}()),!R(p)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new y,r={isProviderFor:function(e,r){var n=t.get(e);return!R(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!R(a)&&P(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!R(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(R(a))return r;for(var i=F(a.keys()),o=0;;){var s=k(i);if(!s)return r.length=o,r;var c=x(s);try{r[o]=c}catch(e){try{I(i)}finally{throw e}}o++}},OrdinaryDeleteMetadata:function(e,r,a){var i=n(r,a,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var o=t.get(r);R(o)||(o.delete(a),0===o.size&&t.delete(o))}return!0}};return h.registerProvider(r),r;function n(n,a,i){var o=t.get(n),s=!1;if(R(o)){if(!i)return;o=new l,t.set(n,o),s=!0}var c=o.get(a);if(R(c)){if(!i)return;if(c=new l,o.set(a,c),!e.setProvider(n,a,r))throw o.delete(a),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!R(n)&&P(n.OrdinaryHasOwnMetadata(e,t,r))}function M(e,t,r){if(E(e,t,r))return _(e,t,r);var n=U(t);return w(n)?void 0:M(e,n,r)}function _(e,t,r){var n=G(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var i=new f,o=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),o.push(u))}for(var d=0,l=a;d<l.length;d++)u=l[d],i.has(u)||(i.add(u),o.push(u));return o}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function S(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function R(e){return void 0===e}function w(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function A(e,t){switch(S(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=N(e,a);if(void 0!==n){var i=n.call(e,r);if(T(i))throw new TypeError;return i}return function(e,t){if("string"===t){var r=e.toString;if(j(r)&&!T(a=r.call(e)))return a;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a}else{var n;if(j(n=e.valueOf)&&!T(a=n.call(e)))return a;var a,i=e.toString;if(j(i)&&!T(a=i.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function P(e){return!!e}function V(e){var t=A(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function D(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function j(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!j(r))throw new TypeError;return r}}function F(e){var t=N(e,i);if(!j(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function x(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===d)return t;if(t!==d)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!R(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(R(r)){if(!D(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!R(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!D(e))throw new TypeError;if(!T(t))throw new TypeError;if(!T(n)&&!R(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var i=(0,e[a])(t,r,n);if(!R(i)&&!w(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=V(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(S(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=V(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),M(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=V(r)),_(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=V(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=V(r)),!T(t))throw new TypeError;R(r)||(r=V(r));var n=G(t,r,!1);return!R(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(a,n),void 0===n.Reflect&&(n.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729);
2
+ var e={729:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,a(r(935),t),a(r(839),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),a=r(735),o=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const a in e)e.hasOwnProperty(a)&&-1===t.indexOf(a)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,a));const a=r.reduce(((t,r)=>{const{prop:a,decorators:o}=r;if(!o||!o.length)return t;const c=o[0];o.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&o.shift();let u=o.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const o=n.hasErrors(e[a.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return o&&((t=t||{})[r.key]=o),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let a;const o=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=o.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(o.length&&o.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(a=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(a=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),a&&((t=t||{})[r]=a),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return a?new o.ModelErrorDefinition(a):void 0}let g,v,E,_;class M{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return M.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return M.getHashingFunction()(this).toString()}static deserialize(e){return M.getSerializer().deserialize(e)}static serialize(e){return M.getSerializer().serialize(e)}static hash(e){return M.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return M.getRegistry().register(e,t)}static get(e){return M.getRegistry().get(e)}static build(e={},t){return M.getRegistry().build(e,t)}static setSerializer(e){E=e}static getSerializer(){return E||(E=new a.JSONSerializer),E}static setHashingFunction(e){_=e}static getHashingFunction(){return _||(_=f.hashObj),_}}t.Model=M},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),a=r(154),o=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=a.ModelKeys.ANCHOR,t=o.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(a.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,a.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===a.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[l])t.add(n.Model.build(a,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),a=r(772),o=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=o.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),o.Model.register(s),s}};const n=r(38),a=r(154),o=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e},847:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(402),t),a(r(38),t),a(r(893),t),a(r(6),t),a(r(19),t),a(r(936),t),a(r(282),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,a)=>{a?Reflect.defineMetadata(e,t,a.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},r(630)},839:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(501),t),a(r(174),t)},174:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const a=r.decorators.shift(),o=a.props?a.props.name:void 0;return"Function"!==o?o:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const o=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(o());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),a=r(593),o=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,a=!1,o){const i=Reflect.getMetadataKeys(t,r).filter((t=>a?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((a,o)=>{const i={key:o!==n.ModelKeys.TYPE?o.substring(e.length):o,props:Reflect.getMetadata(o,t,r)};return a.concat(i)}),o||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log((0,a.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const o=i(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,o.decorators)})),r)),void 0)}},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=o,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=o(u(t,e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=o(t,e);else if("number"==typeof t)r=o(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=o(u(new Date(t),e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),a=r(593);function o(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const o=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=o(a.groups.year),s=o(a.groups.day),c=a.groups.ampm;let u=o(a.groups.hour);c&&(u="PM"===c?u+12:u);const l=o(a.groups.minutes),d=o(a.groups.seconds),f=o(a.groups.milis),p=a.groups.monthname,y=a.groups.monthnamesmall;let h=a.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=o(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),o=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),_=c(r),M=a+1,m=c(M),O=n.MONTH_NAMES[a],b=O.substr(0,3),R=o+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",_).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",M.toString())}},687:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const a=Object.keys(t).filter((e=>-1===n.indexOf(e)));return a.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&a.every((a=>-1!==n.indexOf(a)||e(t[a],r[a],...n)))}},523:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=a,t.hashSerialization=function(e){return a(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=a,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},o=Object.values(e).reduce(t,0);return"number"==typeof o?Math.abs(o):o};const n=r(6);function a(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(154),t),a(r(46),t),a(r(687),t),a(r(523),t),a(r(735),t),a(r(904),t),a(r(735),t),a(r(593),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(375),a=r(436),o=r(154);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new a.ValidatorRegistry({validator:n.TypeValidator,validationKey:o.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(i.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),a("design:paramtypes",[String])],c)},335:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.EMAIL){super(o.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(o.ValidationKeys.EMAIL),a("design:paramtypes",[String])],c)},407:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(i.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),a("design:paramtypes",[String])],c)},169:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(i.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),a("design:paramtypes",[String])],c)},909:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(i.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),a("design:paramtypes",[String])],c)},519:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(i.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),a("design:paramtypes",[String])],c)},651:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(i.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),a("design:paramtypes",[String])],c)},354:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const o=r(273),i=r(772),s=r(787);let c=class extends o.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(i.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),a("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const o=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends o.Validator{constructor(e=i.ValidationKeys.PATTERN,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),a("design:paramtypes",[String,String])],c)},812:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(i.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),a("design:paramtypes",[String])],c)},553:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(i.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),a("design:paramtypes",[String])],c)},375:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(116),a=r(772),o=r(154),i=r(174);class s extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,i.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.URL){super(o.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(o.ValidationKeys.URL),a("design:paramtypes",[String])],c)},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),a=r(593),o=r(174);t.Validator=class{constructor(e,t=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,a.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,o.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(e){return t=>(n.Validation.register({validator:t,validationKey:e,save:!0}),t)};const n=r(770)},493:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const o=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(395),t),a(r(787),t),a(r(335),t),a(r(407),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(354),t),a(r(273),t),a(r(812),t),a(r(553),t),a(r(168),t),a(r(375),t),a(r(964),t),a(r(116),t),a(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:o.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=l,t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,o.metadata)(l(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,o.metadata)(l(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,o.metadata)(l(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,o.metadata)(l(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,o.metadata)(l(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,o.metadata)(l(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,o.metadata)(l(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,o.metadata)(l(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,o.metadata)(l(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata(l(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const a=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>a.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),a.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,o)=>{Reflect.defineMetadata(l(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,o),a.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{f(e,"Set",t,r)(n,a)}},r(630);const n=r(407),a=r(770),o=r(501),i=r(772),s=r(593),c=r(354),u=r(935);function l(e){return i.ValidationKeys.REFLECT+e}function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,o.metadata)(l(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,o=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata(l(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),a.Validation.register({validator:o,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(493),t),a(r(475),t),a(r(792),t),a(r(770),t)},792:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=a(e);function a(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=a(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,N(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!N(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(N(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=a(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=a(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function a(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):o(t,e),t}return o(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,a;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,o=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!a(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:o}}(t.Reflect));var o=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,o){if(!S(r)){if(r.isProviderFor(t,o))return r;if(!S(n)){if(n.isProviderFor(t,o))return r;if(!S(a))for(var i=x(a);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,o))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,o))return e}function u(e,t){var r,n=o.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,o.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(a)&&a.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var a=o.get(e);S(a)&&(a=new d,o.set(e,a)),a.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!S(a)&&A(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!S(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(S(a))return r;for(var o=x(a.keys()),i=0;;){var s=k(o);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(o)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,a){var o=n(r,a,!1);if(S(o))return!1;if(!o.delete(e))return!1;if(0===o.size){var i=t.get(r);S(i)||(i.delete(a),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,a,o){var i=t.get(n),s=!1;if(S(i)){if(!o)return;i=new d,t.set(n,i),s=!0}var c=i.get(a);if(S(c)){if(!o)return;if(c=new d,i.set(a,c),!e.setProvider(n,a,r))throw i.delete(a),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function _(e,t,r){if(E(e,t,r))return M(e,t,r);var n=U(t);return w(n)?void 0:_(e,n,r)}function M(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var o=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];o.has(u)||(o.add(u),i.push(u))}for(var l=0,d=a;l<d.length;l++)u=d[l],o.has(u)||(o.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=K(e,a);if(void 0!==n){var o=n.call(e,r);if(P(o))throw new TypeError;return o}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(a=r.call(e)))return a;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a}else{var n;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a;var a,o=e.toString;if(D(o)&&!P(a=o.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function N(e,t){return e===t||e!=e&&t!=t}function K(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=K(e,o);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var o=(0,e[a])(t,r,n);if(!S(o)&&!w(o)){if(!P(o))throw new TypeError;n=o}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),M(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729);
@@ -19,6 +19,10 @@
19
19
  * @namespace Model
20
20
  * @memberOf module:decorator-validation.Decorators
21
21
  */
22
+ /**
23
+ * @namespace Reflections
24
+ * @memberOf module:decorator-validation.Reflections
25
+ */
22
26
  /**
23
27
  * @namespace Construction
24
28
  * @memberOf module:decorator-validation
@@ -56,6 +60,7 @@
56
60
  * @memberOf module:decorator-validation.Utils
57
61
  */
58
62
  export * from "./utils";
63
+ export * from "./reflection";
59
64
  export * from "./validation";
60
65
  export * from "./model";
61
- export declare const VERSION = "1.0.7";
66
+ export declare const VERSION = "1.0.12";
package/lib/esm/index.js CHANGED
@@ -1 +1,68 @@
1
- export*from"./utils";export*from"./validation";export*from"./model";const VERSION="1.0.7";export{VERSION};
1
+ /**
2
+ * @module decorator-validation
3
+ */
4
+ /**
5
+ * @summary Defines the Model object
6
+ * @namespace Model
7
+ * @memberOf module:decorator-validation
8
+ */
9
+ /**
10
+ * @summary Holds all the supported decorators
11
+ * @namespace Decorators
12
+ * @memberOf module:decorator-validation
13
+ */
14
+ /**
15
+ * @namespace Validation
16
+ * @memberOf module:decorator-validation.Decorators
17
+ */
18
+ /**
19
+ * @namespace Model
20
+ * @memberOf module:decorator-validation.Decorators
21
+ */
22
+ /**
23
+ * @namespace Reflections
24
+ * @memberOf module:decorator-validation.Reflections
25
+ */
26
+ /**
27
+ * @namespace Construction
28
+ * @memberOf module:decorator-validation
29
+ */
30
+ /**
31
+ * @namespace Validation
32
+ * @memberOf module:decorator-validation
33
+ */
34
+ /**
35
+ * @namespace Validators
36
+ * @memberOf module:decorator-validation.Validation
37
+ */
38
+ /**
39
+ * @namespace Utils
40
+ * @memberOf module:decorator-validation
41
+ */
42
+ /**
43
+ * @namespace Dates
44
+ * @memberOf module:decorator-validation.Utils
45
+ */
46
+ /**
47
+ * @namespace Equality
48
+ * @memberOf module:decorator-validation.Utils
49
+ */
50
+ /**
51
+ * @namespace Hashing
52
+ * @memberOf module:decorator-validation.Utils
53
+ */
54
+ /**
55
+ * @namespace Serialization
56
+ * @memberOf module:decorator-validation.Utils
57
+ */
58
+ /**
59
+ * @namespace Format
60
+ * @memberOf module:decorator-validation.Utils
61
+ */
62
+ export * from "./utils";
63
+ export * from "./reflection";
64
+ export * from "./validation";
65
+ export * from "./model";
66
+ export const VERSION = "1.0.12";
67
+
68
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVIOzs7O0dBSUc7QUFFSDs7OztHQUlHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUgsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFFeEIsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQG1vZHVsZSBkZWNvcmF0b3ItdmFsaWRhdGlvblxuICovXG5cbi8qKlxuICogQHN1bW1hcnkgRGVmaW5lcyB0aGUgTW9kZWwgb2JqZWN0XG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAc3VtbWFyeSBIb2xkcyBhbGwgdGhlIHN1cHBvcnRlZCBkZWNvcmF0b3JzXG4gKiBAbmFtZXNwYWNlIERlY29yYXRvcnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5EZWNvcmF0b3JzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLkRlY29yYXRvcnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgUmVmbGVjdGlvbnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uUmVmbGVjdGlvbnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgQ29uc3RydWN0aW9uXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFZhbGlkYXRpb25cbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdG9yc1xuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5WYWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFV0aWxzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIERhdGVzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEVxdWFsaXR5XG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEhhc2hpbmdcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgU2VyaWFsaXphdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5VdGlsc1xuICovXG5cbi8qKlxuICogQG5hbWVzcGFjZSBGb3JtYXRcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG5leHBvcnQgKiBmcm9tIFwiLi91dGlsc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vcmVmbGVjdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vdmFsaWRhdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbW9kZWxcIjtcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBcIjEuMC4xMlwiO1xuIl19