@decaf-ts/decorator-validation 1.4.1 → 1.4.3
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.
- package/dist/decorator-validation.bundle.min.js +1 -1
- package/dist/esm/decorator-validation.bundle.min.esm.js +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/model/decorators.d.ts +2 -2
- package/lib/esm/model/decorators.js +1 -1
- package/lib/esm/utils/decorators.d.ts +2 -2
- package/lib/esm/utils/decorators.js +1 -1
- package/lib/esm/validation/decorators.d.ts +14 -14
- package/lib/esm/validation/decorators.js +1 -1
- package/lib/index.cjs +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/model/decorators.cjs +1 -1
- package/lib/model/decorators.d.ts +2 -2
- package/lib/utils/decorators.cjs +1 -1
- package/lib/utils/decorators.d.ts +2 -2
- package/lib/validation/decorators.cjs +1 -1
- package/lib/validation/decorators.d.ts +14 -14
- package/package.json +2 -2
|
@@ -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 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(965),t),o(r(847),t),t.VERSION="1.4.0"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0;const n=r(735),o=r(936),i=r(317),a=r(192),s=r(523),c=r(710),u=r(154),f=r(772),l=r(593),d=r(402);let p,y;class h{constructor(e){}hasErrors(...e){return(0,a.validate)(this,...e)}equals(e,...t){return(0,i.isEqual)(this,e,...t)}serialize(){return h.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}hash(){return h.hash(this)}static deserialize(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.SERIALIZATION),this.constructor);return t&&t.serializer?n.Serialization.deserialize(e,t.serializer,...t.args||[]):n.Serialization.deserialize(e)}static fromObject(e,t){t||(t={});for(const r of h.getAttributes(e))e[r]=t[r]||void 0;return e}static fromModel(e,t){let r,n;t||(t={});const o=h.getAttributes(e);for(const a of o){if(e[a]=t[a]||void 0,"object"!=typeof e[a])continue;const o=(0,c.isPropertyModel)(e,a);if(o){try{e[a]=h.build(e[a],"string"==typeof o?o:void 0)}catch(e){console.log(e)}continue}const s=(0,i.getPropertyDecorators)(f.ValidationKeys.REFLECT,e,a).decorators;if(r=s.filter((e=>-1!==[u.ModelKeys.TYPE,f.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,l.sf)("failed to find decorators for property {0}",a));n=r.pop();const p=n.props.name?[n.props.name]:Array.isArray(n.props.customTypes)?n.props.customTypes:[n.props.customTypes],y=Object.values(d.ReservedModels).map((e=>e.toLowerCase()));p.forEach((t=>{if(-1===y.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(s.length){const r=s.find((e=>e.key===f.ValidationKeys.LIST));if(r){const n=r.props.class.find((e=>!d.jsTypes.includes(e.toLowerCase())));if("Array"===t&&(e[a]=e[a].map((e=>["object","function"].includes(typeof e)&&n?h.build(e,n):e))),"Set"===t){const t=new Set;for(const r of e[a])["object","function"].includes(typeof r)&&n?t.add(h.build(r,n)):t.add(r);e[a]=t}}}break;default:e[a]&&(e[a]=h.build(e[a],t))}}catch(e){console.log(e)}}))}return e}static setBuilder(e){p=e}static getBuilder(){return p}static getRegistry(){return y||(y=new o.ModelRegistryManager),y}static setRegistry(e){y=e}static register(e,t){return h.getRegistry().register(e,t)}static get(e){return h.getRegistry().get(e)}static build(e={},t){return h.getRegistry().build(e,t)}static getMetadata(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.MODEL),e.constructor);if(!t)throw new Error("could not find metadata for provided "+e.constructor.name);return t}static getAttributes(e){const t=[];let r=e instanceof h?Object.getPrototypeOf(e):e.prototype;for(;null!=r;){const e=r[u.ModelKeys.ATTRIBUTE];e&&t.push(...e),r=Object.getPrototypeOf(r)}return t}static equals(e,t,...r){return(0,i.isEqual)(e,t,...r)}static hasErrors(e,...t){return(0,a.validate)(e,...t)}static serialize(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.SERIALIZATION),e.constructor);return t&&t.serializer?n.Serialization.serialize(this,t.serializer,...t.args||[]):n.Serialization.serialize(e)}static hash(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.HASHING),e.constructor);return t&&t.algorithm?s.Hashing.hash(e,t.algorithm,...t.args||[]):s.Hashing.hash(e)}static key(e){return u.ModelKeys.REFLECT+e}}t.Model=h},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,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=>Object.prototype.hasOwnProperty.call(e,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),o=r(593),i=r(710);t.ModelRegistryManager=class{constructor(e=i.isModel){this.cache={},this.testFunction=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||n.Model.getMetadata(e);if(!(r in this.cache))throw new Error((0,o.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.jsTypes=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={})),t.jsTypes=["string","array","number","boolean","symbol","function","object","undefined","null","bigint"]},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)},t.findLastProtoBeforeObject=function(e){let t=Object.getPrototypeOf(e);if(t===Object.prototype)return e;for(;t!==Object.prototype;){if(t=Object.getPrototypeOf(t),t===Object.prototype)return t;if(Object.getPrototypeOf(t)===Object.prototype)return t}throw new Error("Could not find proper prototype")},t.bindModelPrototype=function(e){if(e instanceof n.Model)return;function t(e,t){Object.setPrototypeOf(e,t)}const r=Object.getPrototypeOf(e);if(r===Object.prototype)return t(e,n.Model.prototype);for(;r!==Object.prototype;){const e=Object.getPrototypeOf(r);if(e===Object.prototype||Object.getPrototypeOf(e)===Object.prototype)return t(r,n.Model.prototype)}throw new Error("Could not find proper prototype to bind")};const n=r(6)},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.model=function(e){return t=>{const r=function(...r){const s=(0,n.construct)(t,...r);(0,n.bindModelPrototype)(s);const c=i.Model.getBuilder();return c&&c(s,r.length?r[0]:void 0),(0,a.metadata)(i.Model.key(o.ModelKeys.MODEL),t.name)(s.constructor),e&&e(s,...r),s};return r.prototype=t.prototype,Object.defineProperty(r,"name",{writable:!1,enumerable:!0,configurable:!1,value:t.prototype.constructor.name}),(0,a.metadata)(i.Model.key(o.ModelKeys.MODEL),t.name)(t),i.Model.register(r,t.name),r}},t.hashedBy=function(e,...t){return(0,a.metadata)(i.Model.key(o.ModelKeys.HASHING),{algorithm:e,args:t})},t.serializedBy=function(e,...t){return(0,a.metadata)(i.Model.key(o.ModelKeys.SERIALIZATION),{serializer:e,args:t})};const n=r(38),o=r(154),i=r(6),a=r(317)},847:function(e,t,r){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(901),t),o(r(710),t),o(r(192),t)},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},710:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPropertyModel=function(e,t){if(i(e[t]))return!0;const r=Reflect.getMetadata(n.ModelKeys.TYPE,e,t);return o.Model.get(r.name)?r.name:void 0},t.isModel=i;const n=r(154),o=r(6);function i(e){try{return e instanceof o.Model||!!o.Model.getMetadata(e)}catch(e){return!1}}},192:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,...t){const r=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&r.push((0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,n));let l;for(const t of r){const{prop:r,decorators:n}=t;if(!n||!n.length)continue;const o=n[0];let a;n.find((e=>e.key===u.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===o.props.name))))&&n.shift();for(const t of n){const n=c.Validation.get(t.key);if(!n)throw new Error(`Missing validator for ${t.key}`);const o=n.hasErrors(e[r.toString()],...t.key===i.ModelKeys.TYPE?[t.props]:Object.values(t.props));o&&(a=a||{},a[t.key]=o)}a&&(l=l||{},l[t.prop.toString()]=a)}for(const t of Object.keys(e).filter((e=>!l||!l[e]))){let r;const n=(0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,t).decorators,c=(0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,t).decorators.filter((e=>-1!==[i.ModelKeys.TYPE,u.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)continue;const d=c.pop(),p=d.props.name?[d.props.name]:Array.isArray(d.props.customTypes)?d.props.customTypes:[d.props.customTypes],y=Object.values(s.ReservedModels).map((e=>e.toLowerCase()));for(const o of p){if(-1===y.indexOf(o.toLowerCase())){const i=Array.isArray(e[t])?u.ValidationKeys.LIST:u.ValidationKeys.TYPE,s=n.find((e=>e.key===i))||{};let c=[];if(s&&s.props){const r=Array.isArray(e[t])?s.props.class:s.props.customTypes;r&&(c=Array.isArray(r)?r.map((e=>`${e}`.toLowerCase())):[r.toLowerCase()])}const l=(e,t)=>{if("object"==typeof t||"function"==typeof t)return(0,f.isModel)(t)?t.hasErrors():c.includes(typeof t)?void 0:"Value has no validatable type"};switch(o){case Array.name:case Set.name:n.length&&n.find((e=>e.key===u.ValidationKeys.LIST))&&(r=(o===Array.name?e[t]:e[t].values()).map((e=>l(t,e))).filter((e=>!!e)),r?.length||(r=void 0));break;default:try{e[t]&&(r=l(t,e[t]))}catch(e){console.warn((0,a.sf)("Model should be validatable but its not: "+e))}}}r&&(l=l||{},l[t]=r)}}return l?new n.ModelErrorDefinition(l):void 0};const n=r(19),o=r(317),i=r(154),a=r(593),s=r(402),c=r(770),u=r(772),f=r(710)},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="decaf.model.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__model",e.CONSTRUCTION="constructed-by",e.ATTRIBUTE="__attributes",e.HASHING="hashing",e.SERIALIZATION="serialization"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=i,t.bindDateToString=a,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=i(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=i(t,e);else if("number"==typeof t)r=i(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=i(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 a(r,e)}},r(630);const n=r(772),o=r(593);function i(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 i=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},a=i(o.groups.year),s=i(o.groups.day),c=o.groups.ampm;let u=i(o.groups.hour);c&&(u="PM"===c?u+12:u);const f=i(o.groups.minutes),l=i(o.groups.seconds),d=i(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=i(`${h}`);return new Date(a,h-1,s,u,f,l,d)}function a(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(),i=e.getFullYear(),a=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),f=e.getMilliseconds(),l=a%12,d=c(l),p=c(a),y=c(s),h=c(u),g=a<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],_=v.substr(0,3),E=c(r),O=o+1,b=c(O),M=n.MONTH_NAMES[o],m=M.substr(0,3),w=i+"",R=w.substr(2,2);return(t=t.replace("hh",d).replace("h",l.toString()).replace("HH",p).replace("H",a.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",f.toString()).replace("dd",E).replace("d",r.toString()).replace("EEEE",v).replace("EEE",_).replace("yyyy",w).replace("yy",R).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",M).replace("MMM",m):t.replace("MM",b).replace("M",O.toString())}},253:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.prop=i,t.propMetadata=function(e,t){return(0,n.apply)(i(),(0,n.metadata)(e,t))};const n=r(317),o=r(154);function i(e=o.ModelKeys.ATTRIBUTE){return(t,r)=>{let n;n=Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=[],n.includes(r)||n.push(r)}}},523:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Hashing=t.DefaultHashingMethod=void 0,t.hashCode=o,t.hashSerialization=function(e){return o(n.Serialization.serialize(e))},t.hashObj=i;const n=r(735);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.toString()}function i(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)},i=Object.values(e).reduce(t,0);return("number"==typeof i?Math.abs(i):i).toString()}t.DefaultHashingMethod="default";class a{static{this.current=t.DefaultHashingMethod}static{this.cache={default:i}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No hashing method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Hashing method ${e} already registered`);this.cache[e]=t,r&&(this.current=e)}static hash(e,t,...r){return t?this.get(t)(e,...r):this.get(this.current)(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Hashing=a},935:function(e,t,r){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(253),t),o(r(523),t),o(r(904),t),o(r(735),t),o(r(593),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Serialization=t.DefaultSerializationMethod=t.JSONSerializer=void 0;const n=r(6),o=r(154);class i{preSerialize(e){const t=Object.assign({},e),r=n.Model.getMetadata(e);return t[o.ModelKeys.ANCHOR]=r||e.constructor.name,t}deserialize(e){const t=JSON.parse(e),r=t[o.ModelKeys.ANCHOR];if(!r)throw new Error("Could not find class reference in serialized model");return n.Model.build(t,r)}serialize(e){return JSON.stringify(this.preSerialize(e))}}t.JSONSerializer=i,t.DefaultSerializationMethod="json";class a{static{this.current=t.DefaultSerializationMethod}static{this.cache={json:new i}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No serialization method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Serialization method ${e} already registered`);this.cache[e]=new t,r&&(this.current=e)}static serialize(e,t,...r){return t?this.get(t).serialize(e,...r):this.get(this.current).serialize(e,...r)}static deserialize(e,t,...r){return t?this.get(t).deserialize(e,...r):this.get(this.current).deserialize(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Serialization=a},593:(e,t)=>{function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r].toString():"undefined"}))}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(436),o=r(772);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),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}static key(e){return o.ValidationKeys.REFLECT+e}}t.Validation=i},395:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.DATE){super(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)(a.ValidationKeys.DATE),o("design:paramtypes",[String])],c)},335:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(772),a=r(273),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){super(e)}hasErrors(e,t,r){return super.hasErrors(e,t||i.DEFAULT_PATTERNS.EMAIL,r)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(i.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},407:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.LIST){super(e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;t=Array.isArray(t)?t:[t];let n,o=!0;for(let r=0;r<(Array.isArray(e)?e.length:e.size);r++)switch(n=e[r],typeof n){case"object":case"function":o=t.includes(n.constructor?.name);break;default:o=t.some((e=>typeof n===e.toLowerCase()))}return o?void 0:this.getMessage(r||this.message,t)}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(a.ValidationKeys.LIST),o("design:paramtypes",[String])],c)},169:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(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)(a.ValidationKeys.MAX_LENGTH),o("design:paramtypes",[String])],c)},909:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MAX){super(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)(a.ValidationKeys.MAX),o("design:paramtypes",[String])],c)},519:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(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)(a.ValidationKeys.MIN_LENGTH),o("design:paramtypes",[String])],c)},651:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.MIN){super(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)(a.ValidationKeys.MIN),o("design:paramtypes",[String])],c)},354:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(273),a=r(772),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PASSWORD){super(e)}hasErrors(e,t,r){return super.hasErrors(e,t||a.DEFAULT_ERROR_MESSAGES.PASSWORD,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(a.ValidationKeys.PASSWORD),o("design:paramtypes",[Object])],c)},273:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,"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)(a.ValidationKeys.PATTERN),o("design:paramtypes",[String])],c)},812:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.REQUIRED){super(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)(a.ValidationKeys.REQUIRED),o("design:paramtypes",[String])],c)},553:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(116),a=r(772),s=r(787);let c=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.STEP){super(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)(a.ValidationKeys.STEP),o("design:paramtypes",[String])],c)},375:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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.TypeValidator=void 0;const i=r(116),a=r(772),s=r(787),c=r(770),u=r(317),f=r(154);let l=class extends i.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.TYPE){super(e)}hasErrors(e,t,r){if(void 0!==e)return(0,u.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=l,t.TypeValidator=l=n([(0,s.validator)(a.ValidationKeys.TYPE),o("design:paramtypes",[String])],l),c.Validation.register({validator:l,validationKey:f.ModelKeys.TYPE,save:!1})},964:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},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 i=r(772),a=r(273),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.URL){super(e)}hasErrors(e,t,r){return super.hasErrors(e,t||i.DEFAULT_PATTERNS.URL,r)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(i.ValidationKeys.URL),o("design:paramtypes",[String])],c)},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),i=r(317);t.Validator=class{constructor(e=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...t){this.message=e,t.length&&(this.acceptedTypes=t),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,i.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.customKeyCache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyCache)}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.customKeyCache=Object.assign({},this.customKeyCache,o)}}))}}},772:(e,t,r)=>{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;const n=r(154);t.ValidationKeys={REFLECT:`${n.ModelKeys.REFLECT}validation.`,VALIDATOR:"validator",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}",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(0,i.apply)((t=>(e.forEach((e=>{n.Validation.register({validator:t,validationKey:e,save:!0})})),t)),(0,i.metadata)(n.Validation.key(o.ValidationKeys.VALIDATOR),e))};const n=r(770),o=r(772),i=r(317)},493:function(e,t,r){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 i=r(395),a=r(375),s=r(354),c=r(553),u=r(964),f=r(273),l=r(651),d=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={DateValidator:i.DateValidator,EmailValidator:g.EmailValidator,ListValidator:v.ListValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:d.MinLengthValidator,MinValidator:l.MinValidator,PasswordValidator:s.PasswordValidator,PatternValidator:f.PatternValidator,RequiredValidator:h.RequiredValidator,StepValidator:c.StepValidator,TypeValidator:a.TypeValidator,URLValidator:u.URLValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.EMAIL),{pattern:n.DEFAULT_PATTERNS.EMAIL,message:e,types:[String.name]})},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.URL),{pattern:n.DEFAULT_PATTERNS.URL,message:e,types:[String.name]})},t.type=function(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.TYPE),{customTypes:e,message:t})},t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE){return(r,c)=>{(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]})(r,c);const u=new WeakMap;Object.defineProperty(r,c,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,c);r&&!r.configurable||Object.defineProperty(this,c,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=(0,i.parseDate)(e,t),u.set(this,r)}catch(e){console.error((0,o.sf)("Failed to parse date: {0}",e.message||e))}}}),this[c]=t},get(){console.log("here")}})}},t.password=function(e=n.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]})},t.list=c,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST){return c(e,"Set",t)},r(630);const n=r(772),o=r(593),i=r(46),a=r(253),s=r(770);function c(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST){return(0,a.propMetadata)(s.Validation.key(n.ValidationKeys.LIST),{class:Array.isArray(e)?e.map((e=>e.name)):[e.name],type:t,message:r})}},965:function(e,t,r){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)=>{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",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!a&&!s,u={create:a?function(){return G(Object.create(null))}:s?function(){return G({__proto__:null})}:function(){return G({})},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]}},f=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,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--,L(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,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!L(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(L(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 a(e,t){return[e,t]}}(),d="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}(),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@@"+a()}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 i(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function a(){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):i(t,e),t}return i(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!R(y)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),R(e)&&(e=function(){var e,r,n,o;R(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,i=e.deleteMetadata,a=new p;return{isProviderFor:function(e,t){var r=a.get(e);return!(R(r)||!r.has(t))||!!o(e,t).length&&(R(r)&&(r=new d,a.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new p,a={registerProvider:s,getProvider:u,setProvider:h};return a;function s(t){if(!Object.isExtensible(a))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===o&&(o=new d),o.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(o))for(var a=x(o);;){var s=I(a);if(!s)return;var c=K(s);if(c.isProviderFor(t,i))return F(a),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 f(e){if(R(e))throw new TypeError;return r===e||n===e||!R(o)&&o.has(e)}function h(e,t,r){if(!f(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var o=i.get(e);R(o)&&(o=new l,i.set(e,o)),o.set(t,r)}return!0}}()),!R(y)&&T(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!R(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!R(o)&&j(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!R(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(R(o))return r;for(var i=x(o.keys()),a=0;;){var s=I(i);if(!s)return r.length=a,r;var c=K(s);try{r[a]=c}catch(e){try{F(i)}finally{throw e}}a++}},OrdinaryDeleteMetadata:function(e,r,o){var i=n(r,o,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var a=t.get(r);R(a)||(a.delete(o),0===a.size&&t.delete(a))}return!0}};return h.registerProvider(r),r;function n(n,o,i){var a=t.get(n),s=!1;if(R(a)){if(!i)return;a=new l,t.set(n,a),s=!0}var c=a.get(o);if(R(c)){if(!i)return;if(c=new l,a.set(o,c),!e.setProvider(n,o,r))throw a.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(_(e,t,r))return!0;var n=U(t);return!S(n)&&v(e,n,r)}function _(e,t,r){var n=z(t,r,!1);return!R(n)&&j(n.OrdinaryHasOwnMetadata(e,t,r))}function E(e,t,r){if(_(e,t,r))return O(e,t,r);var n=U(t);return S(n)?void 0:E(e,n,r)}function O(e,t,r){var n=z(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function b(e,t,r,n){z(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function M(e,t){var r=m(e,t),n=U(e);if(null===n)return r;var o=M(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var i=new d,a=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),a.push(u))}for(var f=0,l=o;f<l.length;f++)u=l[f],i.has(u)||(i.add(u),a.push(u));return a}function m(e,t){var r=z(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function w(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 S(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function P(e,t){switch(w(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,o);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(V(r)&&!T(o=r.call(e)))return o;if(V(n=e.valueOf)&&!T(o=n.call(e)))return o}else{var n;if(V(n=e.valueOf)&&!T(o=n.call(e)))return o;var o,i=e.toString;if(V(i)&&!T(o=i.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function j(e){return!!e}function A(e){var t=P(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 V(e){return"function"==typeof e}function k(e){return"function"==typeof e}function L(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!V(r))throw new TypeError;return r}}function x(e){var t=N(e,i);if(!V(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function K(e){return e.value}function I(e){var t=e.next();return!t.done&&t}function F(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===f)return t;if(t!==f)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 z(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 G(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(!k(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)&&!S(n)){if(!k(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)&&!S(n))throw new TypeError;return S(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var i=(0,e[o])(t,r,n);if(!R(i)&&!S(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=A(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(w(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;b(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=A(n)),b(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),_(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),E(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),O(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=A(t)),M(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=A(t)),m(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=A(r)),!T(t))throw new TypeError;R(r)||(r=A(r));var n=z(t,r,!1);return!R(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))},282:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReflectionKeys=void 0,function(e){e.TYPE="design:type"}(r||(t.ReflectionKeys=r={}))},681:(e,t,r)=>{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)}},t.apply=function(...e){return(t,r,n)=>{for(const o of e)t instanceof Function&&!n?o(t):o(t,r,n)}},r(896)},47:(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 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)))}},317:function(e,t,r){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(282),t),o(r(681),t),o(r(47),t),o(r(114),t),o(r(134),t),t.VERSION="0.3.2"},114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},134:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ReflectionKeys.TYPE,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.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)},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let o=e;const i=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(i());return n},t.getClassDecorators=function(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)}),[])},t.checkType=a,t.checkTypes=s,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return a(e,t);case"object":return!Array.isArray(t)||s(e,t);case"function":return!t.name||"Object"===t.name||a(e,t.name);default:return!0}},r(896);const n=r(282),o=r(47);function i(e,t,r,a=!1,s=!0,c){const u=function(e,t,r,o=!1,i){const a=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ReflectionKeys.TYPE||t.toString().startsWith(e))).reduce(((o,i)=>{const a={key:i!==n.ReflectionKeys.TYPE?i.substring(e.length):i,props:Reflect.getMetadata(i,t,r)};return o.concat(a)}),i||[]);return{prop:r.toString(),decorators:a}}(e,t,r,a,c);return s&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,s,u.decorators):{prop:u.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log(`Found a similar decorator for the ${e.key} propertyof a ${t.constructor.name} model but with different attributes.The original one will be kept`),!1):(r[e.key.toString()]=e.props,!0)))}(u.decorators)}}function a(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function s(e,t){return!t.every((t=>!a(e,t)))}},896:(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",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!a&&!s,u={create:a?function(){return G(Object.create(null))}:s?function(){return G({__proto__:null})}:function(){return G({})},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]}},f=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,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--,L(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,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){if(!L(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(L(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 a(e,t){return[e,t]}}(),d="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}(),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@@"+a()}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 i(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function a(){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):i(t,e),t}return i(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!R(y)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),R(e)&&(e=function(){var e,r,n,o;R(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,i=e.deleteMetadata,a=new p;return{isProviderFor:function(e,t){var r=a.get(e);return!(R(r)||!r.has(t))||!!o(e,t).length&&(R(r)&&(r=new d,a.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:i}}(t.Reflect));var i=new p,a={registerProvider:s,getProvider:u,setProvider:h};return a;function s(t){if(!Object.isExtensible(a))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===o&&(o=new d),o.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(o))for(var a=x(o);;){var s=I(a);if(!s)return;var c=K(s);if(c.isProviderFor(t,i))return F(a),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 f(e){if(R(e))throw new TypeError;return r===e||n===e||!R(o)&&o.has(e)}function h(e,t,r){if(!f(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!R(n))return!1;var o=i.get(e);R(o)&&(o=new l,i.set(e,o)),o.set(t,r)}return!0}}()),!R(y)&&T(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!R(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!R(o)&&j(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!R(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(R(o))return r;for(var i=x(o.keys()),a=0;;){var s=I(i);if(!s)return r.length=a,r;var c=K(s);try{r[a]=c}catch(e){try{F(i)}finally{throw e}}a++}},OrdinaryDeleteMetadata:function(e,r,o){var i=n(r,o,!1);if(R(i))return!1;if(!i.delete(e))return!1;if(0===i.size){var a=t.get(r);R(a)||(a.delete(o),0===a.size&&t.delete(a))}return!0}};return h.registerProvider(r),r;function n(n,o,i){var a=t.get(n),s=!1;if(R(a)){if(!i)return;a=new l,t.set(n,a),s=!0}var c=a.get(o);if(R(c)){if(!i)return;if(c=new l,a.set(o,c),!e.setProvider(n,o,r))throw a.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(_(e,t,r))return!0;var n=U(t);return!S(n)&&v(e,n,r)}function _(e,t,r){var n=z(t,r,!1);return!R(n)&&j(n.OrdinaryHasOwnMetadata(e,t,r))}function E(e,t,r){if(_(e,t,r))return O(e,t,r);var n=U(t);return S(n)?void 0:E(e,n,r)}function O(e,t,r){var n=z(t,r,!1);if(!R(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function b(e,t,r,n){z(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function M(e,t){var r=m(e,t),n=U(e);if(null===n)return r;var o=M(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var i=new d,a=[],s=0,c=r;s<c.length;s++){var u=c[s];i.has(u)||(i.add(u),a.push(u))}for(var f=0,l=o;f<l.length;f++)u=l[f],i.has(u)||(i.add(u),a.push(u));return a}function m(e,t){var r=z(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function w(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 S(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function P(e,t){switch(w(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,o);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(V(r)&&!T(o=r.call(e)))return o;if(V(n=e.valueOf)&&!T(o=n.call(e)))return o}else{var n;if(V(n=e.valueOf)&&!T(o=n.call(e)))return o;var o,i=e.toString;if(V(i)&&!T(o=i.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function j(e){return!!e}function A(e){var t=P(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 V(e){return"function"==typeof e}function k(e){return"function"==typeof e}function L(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!V(r))throw new TypeError;return r}}function x(e){var t=N(e,i);if(!V(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function K(e){return e.value}function I(e){var t=e.next();return!t.done&&t}function F(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===f)return t;if(t!==f)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 z(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 G(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(!k(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)&&!S(n)){if(!k(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)&&!S(n))throw new TypeError;return S(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var i=(0,e[o])(t,r,n);if(!R(i)&&!S(i)){if(!T(i))throw new TypeError;n=i}}return n}(e,t,r=A(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(r))throw new TypeError;if(!R(n)&&!function(e){switch(w(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;b(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return R(n)||(n=A(n)),b(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),_(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),E(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return R(r)||(r=A(r)),O(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=A(t)),M(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return R(t)||(t=A(t)),m(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(R(r)||(r=A(r)),!T(t))throw new TypeError;R(r)||(r=A(r));var n=z(t,r,!1);return!R(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 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 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(965),t),o(r(847),t),t.VERSION="1.4.2"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0;const n=r(735),o=r(936),a=r(32),i=r(192),s=r(523),c=r(710),u=r(154),l=r(772),d=r(593),f=r(402);let p,y;class h{constructor(e){}hasErrors(...e){return(0,i.validate)(this,...e)}equals(e,...t){return(0,a.isEqual)(this,e,...t)}serialize(){return h.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}hash(){return h.hash(this)}static deserialize(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.SERIALIZATION),this.constructor);return t&&t.serializer?n.Serialization.deserialize(e,t.serializer,...t.args||[]):n.Serialization.deserialize(e)}static fromObject(e,t){t||(t={});for(const r of h.getAttributes(e))e[r]=t[r]||void 0;return e}static fromModel(e,t){let r,n;t||(t={});const o=h.getAttributes(e);for(const i of o){if(e[i]=t[i]||void 0,"object"!=typeof e[i])continue;const o=(0,c.isPropertyModel)(e,i);if(o){try{e[i]=h.build(e[i],"string"==typeof o?o:void 0)}catch(e){console.log(e)}continue}const s=(0,a.getPropertyDecorators)(l.ValidationKeys.REFLECT,e,i).decorators;if(r=s.filter((e=>-1!==[u.ModelKeys.TYPE,l.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,d.sf)("failed to find decorators for property {0}",i));n=r.pop();const p=n.props.name?[n.props.name]:Array.isArray(n.props.customTypes)?n.props.customTypes:[n.props.customTypes],y=Object.values(f.ReservedModels).map((e=>e.toLowerCase()));p.forEach((t=>{if(-1===y.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(s.length){const r=s.find((e=>e.key===l.ValidationKeys.LIST));if(r){const n=r.props.class.find((e=>!f.jsTypes.includes(e.toLowerCase())));if("Array"===t&&(e[i]=e[i].map((e=>["object","function"].includes(typeof e)&&n?h.build(e,n):e))),"Set"===t){const t=new Set;for(const r of e[i])["object","function"].includes(typeof r)&&n?t.add(h.build(r,n)):t.add(r);e[i]=t}}}break;default:e[i]&&(e[i]=h.build(e[i],t))}}catch(e){console.log(e)}}))}return e}static setBuilder(e){p=e}static getBuilder(){return p}static getRegistry(){return y||(y=new o.ModelRegistryManager),y}static setRegistry(e){y=e}static register(e,t){return h.getRegistry().register(e,t)}static get(e){return h.getRegistry().get(e)}static build(e={},t){return h.getRegistry().build(e,t)}static getMetadata(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.MODEL),e.constructor);if(!t)throw new Error("could not find metadata for provided "+e.constructor.name);return t}static getAttributes(e){const t=[];let r=e instanceof h?Object.getPrototypeOf(e):e.prototype;for(;null!=r;){const e=r[u.ModelKeys.ATTRIBUTE];e&&t.push(...e),r=Object.getPrototypeOf(r)}return t}static equals(e,t,...r){return(0,a.isEqual)(e,t,...r)}static hasErrors(e,...t){return(0,i.validate)(e,...t)}static serialize(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.SERIALIZATION),e.constructor);return t&&t.serializer?n.Serialization.serialize(this,t.serializer,...t.args||[]):n.Serialization.serialize(e)}static hash(e){const t=Reflect.getMetadata(this.key(u.ModelKeys.HASHING),e.constructor);return t&&t.algorithm?s.Hashing.hash(e,t.algorithm,...t.args||[]):s.Hashing.hash(e)}static key(e){return u.ModelKeys.REFLECT+e}}t.Model=h},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,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=>Object.prototype.hasOwnProperty.call(e,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),o=r(593),a=r(710);t.ModelRegistryManager=class{constructor(e=a.isModel){this.cache={},this.testFunction=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||n.Model.getMetadata(e);if(!(r in this.cache))throw new Error((0,o.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.jsTypes=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={})),t.jsTypes=["string","array","number","boolean","symbol","function","object","undefined","null","bigint"]},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)},t.findLastProtoBeforeObject=function(e){let t=Object.getPrototypeOf(e);if(t===Object.prototype)return e;for(;t!==Object.prototype;){if(t=Object.getPrototypeOf(t),t===Object.prototype)return t;if(Object.getPrototypeOf(t)===Object.prototype)return t}throw new Error("Could not find proper prototype")},t.bindModelPrototype=function(e){if(e instanceof n.Model)return;function t(e,t){Object.setPrototypeOf(e,t)}const r=Object.getPrototypeOf(e);if(r===Object.prototype)return t(e,n.Model.prototype);for(;r!==Object.prototype;){const e=Object.getPrototypeOf(r);if(e===Object.prototype||Object.getPrototypeOf(e)===Object.prototype)return t(r,n.Model.prototype)}throw new Error("Could not find proper prototype to bind")};const n=r(6)},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.model=function(e){return t=>{const r=function(...r){const s=(0,n.construct)(t,...r);(0,n.bindModelPrototype)(s);const c=a.Model.getBuilder();return c&&c(s,r.length?r[0]:void 0),(0,i.metadata)(a.Model.key(o.ModelKeys.MODEL),t.name)(s.constructor),e&&e(s,...r),s};return r.prototype=t.prototype,Object.defineProperty(r,"name",{writable:!1,enumerable:!0,configurable:!1,value:t.prototype.constructor.name}),(0,i.metadata)(a.Model.key(o.ModelKeys.MODEL),t.name)(t),a.Model.register(r,t.name),r}},t.hashedBy=function(e,...t){return(0,i.metadata)(a.Model.key(o.ModelKeys.HASHING),{algorithm:e,args:t})},t.serializedBy=function(e,...t){return(0,i.metadata)(a.Model.key(o.ModelKeys.SERIALIZATION),{serializer:e,args:t})};const n=r(38),o=r(154),a=r(6),i=r(32)},847:function(e,t,r){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),o(r(710),t),o(r(192),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},710:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPropertyModel=function(e,t){if(a(e[t]))return!0;const r=Reflect.getMetadata(n.ModelKeys.TYPE,e,t);return o.Model.get(r.name)?r.name:void 0},t.isModel=a;const n=r(154),o=r(6);function a(e){try{return e instanceof o.Model||!!o.Model.getMetadata(e)}catch(e){return!1}}},192:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,...t){const r=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&r.push((0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,n));let d;for(const t of r){const{prop:r,decorators:n}=t;if(!n||!n.length)continue;const o=n[0];let i;n.find((e=>e.key===u.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===o.props.name))))&&n.shift();for(const t of n){const n=c.Validation.get(t.key);if(!n)throw new Error(`Missing validator for ${t.key}`);const o=n.hasErrors(e[r.toString()],...t.key===a.ModelKeys.TYPE?[t.props]:Object.values(t.props));o&&(i=i||{},i[t.key]=o)}i&&(d=d||{},d[t.prop.toString()]=i)}for(const t of Object.keys(e).filter((e=>!d||!d[e]))){let r;const n=(0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,t).decorators,c=(0,o.getPropertyDecorators)(u.ValidationKeys.REFLECT,e,t).decorators.filter((e=>-1!==[a.ModelKeys.TYPE,u.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)continue;const f=c.pop(),p=f.props.name?[f.props.name]:Array.isArray(f.props.customTypes)?f.props.customTypes:[f.props.customTypes],y=Object.values(s.ReservedModels).map((e=>e.toLowerCase()));for(const o of p){if(-1===y.indexOf(o.toLowerCase())){const a=Array.isArray(e[t])?u.ValidationKeys.LIST:u.ValidationKeys.TYPE,s=n.find((e=>e.key===a))||{};let c=[];if(s&&s.props){const r=Array.isArray(e[t])?s.props.class:s.props.customTypes;r&&(c=Array.isArray(r)?r.map((e=>`${e}`.toLowerCase())):[r.toLowerCase()])}const d=(e,t)=>{if("object"==typeof t||"function"==typeof t)return(0,l.isModel)(t)?t.hasErrors():c.includes(typeof t)?void 0:"Value has no validatable type"};switch(o){case Array.name:case Set.name:n.length&&n.find((e=>e.key===u.ValidationKeys.LIST))&&(r=(o===Array.name?e[t]:e[t].values()).map((e=>d(t,e))).filter((e=>!!e)),r?.length||(r=void 0));break;default:try{e[t]&&(r=d(t,e[t]))}catch(e){console.warn((0,i.sf)("Model should be validatable but its not: "+e))}}}r&&(d=d||{},d[t]=r)}}return d?new n.ModelErrorDefinition(d):void 0};const n=r(19),o=r(32),a=r(154),i=r(593),s=r(402),c=r(770),u=r(772),l=r(710)},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="decaf.model.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__model",e.CONSTRUCTION="constructed-by",e.ATTRIBUTE="__attributes",e.HASHING="hashing",e.SERIALIZATION="serialization"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{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,O=c(M),b=n.MONTH_NAMES[o],m=b.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",b).replace("MMM",m):t.replace("MM",O).replace("M",M.toString())}},253:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.prop=a,t.propMetadata=function(e,t){return(0,n.apply)(a(),(0,n.metadata)(e,t))};const n=r(32),o=r(154);function a(e=o.ModelKeys.ATTRIBUTE){return(t,r)=>{let n;n=Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=[],n.includes(r)||n.push(r)}}},523:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Hashing=t.DefaultHashingMethod=void 0,t.hashCode=o,t.hashSerialization=function(e){return o(n.Serialization.serialize(e))},t.hashObj=a;const n=r(735);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.toString()}function a(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).toString()}t.DefaultHashingMethod="default";class i{static{this.current=t.DefaultHashingMethod}static{this.cache={default:a}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No hashing method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Hashing method ${e} already registered`);this.cache[e]=t,r&&(this.current=e)}static hash(e,t,...r){return t?this.get(t)(e,...r):this.get(this.current)(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Hashing=i},935:function(e,t,r){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(253),t),o(r(523),t),o(r(904),t),o(r(735),t),o(r(593),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Serialization=t.DefaultSerializationMethod=t.JSONSerializer=void 0;const n=r(6),o=r(154);class a{preSerialize(e){const t=Object.assign({},e),r=n.Model.getMetadata(e);return t[o.ModelKeys.ANCHOR]=r||e.constructor.name,t}deserialize(e){const t=JSON.parse(e),r=t[o.ModelKeys.ANCHOR];if(!r)throw new Error("Could not find class reference in serialized model");return n.Model.build(t,r)}serialize(e){return JSON.stringify(this.preSerialize(e))}}t.JSONSerializer=a,t.DefaultSerializationMethod="json";class i{static{this.current=t.DefaultSerializationMethod}static{this.cache={json:new a}}constructor(){}static get(e){if(e in this.cache)return this.cache[e];throw new Error(`No serialization method registered under ${e}`)}static register(e,t,r=!1){if(e in this.cache)throw new Error(`Serialization method ${e} already registered`);this.cache[e]=new t,r&&(this.current=e)}static serialize(e,t,...r){return t?this.get(t).serialize(e,...r):this.get(this.current).serialize(e,...r)}static deserialize(e,t,...r){return t?this.get(t).deserialize(e,...r):this.get(this.current).deserialize(e,...r)}static setDefault(e){this.current=this.get(e)}}t.Serialization=i},593:(e,t)=>{function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r].toString():"undefined"}))}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(436),o=r(772);class a{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&a.actingValidatorRegistry&&a.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),a.actingValidatorRegistry=e}static getRegistry(){return a.actingValidatorRegistry||(a.actingValidatorRegistry=new n.ValidatorRegistry),a.actingValidatorRegistry}static get(e){return a.getRegistry().get(e)}static register(...e){return a.getRegistry().register(...e)}static key(e){return o.ValidationKeys.REFLECT+e}}t.Validation=a},395:function(e,t,r){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(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){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(e)}hasErrors(e,t,r){return super.hasErrors(e,t||a.DEFAULT_PATTERNS.EMAIL,r)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(a.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},407:function(e,t,r){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(e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;t=Array.isArray(t)?t:[t];let n,o=!0;for(let r=0;r<(Array.isArray(e)?e.length:e.size);r++)switch(n=e[r],typeof n){case"object":case"function":o=t.includes(n.constructor?.name);break;default:o=t.some((e=>typeof n===e.toLowerCase()))}return o?void 0: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){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(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){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(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){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(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)},889:function(e,t,r){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(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){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){super(e)}hasErrors(e,t,r){return super.hasErrors(e,t||i.DEFAULT_ERROR_MESSAGES.PASSWORD,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),o("design:paramtypes",[Object])],c)},273:function(e,t,r){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.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,"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])],c)},812:function(e,t,r){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(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){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(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:function(e,t,r){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.TypeValidator=void 0;const a=r(116),i=r(772),s=r(787),c=r(770),u=r(32),l=r(154);let d=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(e)}hasErrors(e,t,r){if(void 0!==e)return(0,u.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=d,t.TypeValidator=d=n([(0,s.validator)(i.ValidationKeys.TYPE),o("design:paramtypes",[String])],d),c.Validation.register({validator:d,validationKey:l.ModelKeys.TYPE,save:!1})},964:function(e,t,r){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(e)}hasErrors(e,t,r){return super.hasErrors(e,t||a.DEFAULT_PATTERNS.URL,r)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(a.ValidationKeys.URL),o("design:paramtypes",[String])],c)},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),a=r(32);t.Validator=class{constructor(e=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...t){this.message=e,t.length&&(this.acceptedTypes=t),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)=>{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.customKeyCache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyCache)}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.customKeyCache=Object.assign({},this.customKeyCache,o)}}))}}},772:(e,t,r)=>{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;const n=r(154);t.ValidationKeys={REFLECT:`${n.ModelKeys.REFLECT}validation.`,VALIDATOR:"validator",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}",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(0,a.apply)((t=>(e.forEach((e=>{n.Validation.register({validator:t,validationKey:e,save:!0})})),t)),(0,a.metadata)(n.Validation.key(o.ValidationKeys.VALIDATOR),e))};const n=r(770),o=r(772),a=r(32)},493:function(e,t,r){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(889),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(889),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={DateValidator:a.DateValidator,EmailValidator:g.EmailValidator,ListValidator:v.ListValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PasswordValidator:s.PasswordValidator,PatternValidator:l.PatternValidator,RequiredValidator:h.RequiredValidator,StepValidator:c.StepValidator,TypeValidator:i.TypeValidator,URLValidator:u.URLValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.required=function(e=n.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=n.DEFAULT_ERROR_MESSAGES.STEP){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=n.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=n.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=n.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.EMAIL),{pattern:n.DEFAULT_PATTERNS.EMAIL,message:e,types:[String.name]})},t.url=function(e=n.DEFAULT_ERROR_MESSAGES.URL){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.URL),{pattern:n.DEFAULT_PATTERNS.URL,message:e,types:[String.name]})},t.type=function(e,t=n.DEFAULT_ERROR_MESSAGES.TYPE){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.TYPE),{customTypes:e,message:t})},t.date=function(e="dd/MM/yyyy",t=n.DEFAULT_ERROR_MESSAGES.DATE){return(r,c)=>{(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]})(r,c);const u=new WeakMap;Object.defineProperty(r,c,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,c);r&&!r.configurable||Object.defineProperty(this,c,{enumerable:!0,configurable:!1,get:()=>u.get(this),set:t=>{let r;try{r=(0,a.parseDate)(e,t),u.set(this,r)}catch(e){console.error((0,o.sf)("Failed to parse date: {0}",e.message||e))}}}),this[c]=t},get(){console.log("here")}})}},t.password=function(e=n.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=n.DEFAULT_ERROR_MESSAGES.PASSWORD){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]})},t.list=c,t.set=function(e,t=n.DEFAULT_ERROR_MESSAGES.LIST){return c(e,"Set",t)},r(630);const n=r(772),o=r(593),a=r(46),i=r(253),s=r(770);function c(e,t="Array",r=n.DEFAULT_ERROR_MESSAGES.LIST){return(0,i.propMetadata)(s.Validation.key(n.ValidationKeys.LIST),{class:Array.isArray(e)?e.map((e=>e.name)):[e.name],type:t,message:r})}},965:function(e,t,r){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)=>{Object.defineProperty(t,"__esModule",{value:!0})},267:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReflectionKeys=void 0,function(e){e.TYPE="design:type"}(r||(t.ReflectionKeys=r={}))},530:(e,t,r)=>{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)}},t.apply=function(...e){return(t,r,n)=>{for(const o of e)t instanceof Function&&!n?o(t):o(t,r,n)}},r(630)},651:(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 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)))}},32:function(e,t,r){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(267),t),o(r(530),t),o(r(651),t),o(r(199),t),o(r(115),t),t.VERSION="0.3.3"},199:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},115:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPropertyDecorators=a,t.getTypeFromDecorator=function(e,t){const r=a(n.ReflectionKeys.TYPE,e,t,!1);if(!r||!r.decorators)return;const o=r.decorators.shift(),i=o.props?o.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,o)=>{const i=a(t,e,n,0!==o);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 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=function(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)}),[])},t.checkType=i,t.checkTypes=s,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return i(e,t);case"object":return!Array.isArray(t)||s(e,t);case"function":return!t.name||"Object"===t.name||i(e,t.name);default:return!0}},r(630);const n=r(267),o=r(651);function a(e,t,r,i=!1,s=!0,c){const u=function(e,t,r,o=!1,a){const i=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ReflectionKeys.TYPE||t.toString().startsWith(e))).reduce(((o,a)=>{const i={key:a!==n.ReflectionKeys.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,i,c);return s&&Object.getPrototypeOf(t)!==Object.prototype?a(e,Object.getPrototypeOf(t.constructor),r,!0,s,u.decorators):{prop:u.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log(`Found a similar decorator for the ${e.key} propertyof a ${t.constructor.name} model but with different attributes.The original one will be kept`),!1):(r[e.key.toString()]=e.props,!0)))}(u.decorators)}}function i(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function s(e,t){return!t.every((t=>!i(e,t)))}},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 G(Object.create(null))}:s?function(){return G({__proto__:null})}:function(){return G({})},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)&&T(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=K(o);;){var s=x(i);if(!s)return;var c=I(s);if(c.isProviderFor(t,a))return F(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)&&T(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=K(o.keys()),i=0;;){var s=x(a);if(!s)return r.length=i,r;var c=I(s);try{r[i]=c}catch(e){try{F(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=z(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=z(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function O(e,t,r,n){z(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function b(e,t){var r=m(e,t),n=U(e);if(null===n)return r;var o=b(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 m(e,t){var r=z(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 T(e){return"object"==typeof e?null!==e:"function"==typeof e}function P(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(T(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!T(o=r.call(e)))return o;if(D(n=e.valueOf)&&!T(o=n.call(e)))return o}else{var n;if(D(n=e.valueOf)&&!T(o=n.call(e)))return o;var o,a=e.toString;if(D(a)&&!T(o=a.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=P(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 K(e){var t=k(e,a);if(!D(t))throw new TypeError;var r=t.call(e);if(!T(r))throw new TypeError;return r}function I(e){return e.value}function x(e){var t=e.next();return!t.done&&t}function F(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 z(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 G(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(!T(t))throw new TypeError;if(!T(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(!T(a))throw new TypeError;n=a}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!T(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;O(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!T(r))throw new TypeError;return S(n)||(n=j(n)),O(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!T(t))throw new TypeError;return S(r)||(r=j(r)),M(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!T(e))throw new TypeError;return S(t)||(t=j(t)),m(e,t)})),e("deleteMetadata",(function(e,t,r){if(!T(t))throw new TypeError;if(S(r)||(r=j(r)),!T(t))throw new TypeError;S(r)||(r=j(r));var n=z(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}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);
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
export * from "./utils";
|
|
63
63
|
export * from "./validation";
|
|
64
64
|
export * from "./model";
|
|
65
|
-
export const VERSION = "1.4.
|
|
65
|
+
export const VERSION = "1.4.2";
|
|
66
66
|
|
|
67
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
67
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVIOzs7O0dBSUc7QUFFSDs7OztHQUlHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUgsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFFeEIsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQG1vZHVsZSBkZWNvcmF0b3ItdmFsaWRhdGlvblxuICovXG5cbi8qKlxuICogQHN1bW1hcnkgRGVmaW5lcyB0aGUgTW9kZWwgb2JqZWN0XG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAc3VtbWFyeSBIb2xkcyBhbGwgdGhlIHN1cHBvcnRlZCBkZWNvcmF0b3JzXG4gKiBAbmFtZXNwYWNlIERlY29yYXRvcnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5EZWNvcmF0b3JzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLkRlY29yYXRvcnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgUmVmbGVjdGlvbnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uUmVmbGVjdGlvbnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgQ29uc3RydWN0aW9uXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFZhbGlkYXRpb25cbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdG9yc1xuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5WYWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFV0aWxzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIERhdGVzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEVxdWFsaXR5XG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEhhc2hpbmdcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgU2VyaWFsaXphdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5VdGlsc1xuICovXG5cbi8qKlxuICogQG5hbWVzcGFjZSBGb3JtYXRcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG5leHBvcnQgKiBmcm9tIFwiLi91dGlsc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vdmFsaWRhdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbW9kZWxcIjtcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBcIjEuNC4yXCI7XG4iXX0=
|
|
@@ -19,5 +19,5 @@ export type InstanceCallback = (instance: any, ...args: any[]) => void;
|
|
|
19
19
|
* @category Decorators
|
|
20
20
|
*/
|
|
21
21
|
export declare function model(instanceCallback?: InstanceCallback): any;
|
|
22
|
-
export declare function hashedBy(algorithm: string, ...args: any[]):
|
|
23
|
-
export declare function serializedBy(serializer: string, ...args: any[]):
|
|
22
|
+
export declare function hashedBy(algorithm: string, ...args: any[]): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
23
|
+
export declare function serializedBy(serializer: string, ...args: any[]): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
@@ -59,4 +59,4 @@ export function serializedBy(serializer, ...args) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9tb2RlbC9kZWNvcmF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMvRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDL0MsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUNoQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFTaEQ7Ozs7Ozs7Ozs7Ozs7R0FhRztBQUNILE1BQU0sVUFBVSxLQUFLLENBQUMsZ0JBQW1DO0lBQ3ZELE9BQU8sQ0FBQyxDQUFDLFFBQWEsRUFBRSxFQUFFO1FBQ3hCLGdDQUFnQztRQUNoQyxNQUFNLGNBQWMsR0FBUSxVQUFVLEdBQUcsSUFBVztZQUNsRCxNQUFNLFFBQVEsR0FBZ0MsU0FBUyxDQUNyRCxRQUFRLEVBQ1IsR0FBRyxJQUFJLENBQ1IsQ0FBQztZQUNGLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQzdCLDJFQUEyRTtZQUMzRSxNQUFNLE9BQU8sR0FBRyxLQUFLLENBQUMsVUFBVSxFQUFFLENBQUM7WUFDbkMsSUFBSSxPQUFPO2dCQUFFLE9BQU8sQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQztZQUVsRSxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQztZQUUxRSxJQUFJLGdCQUFnQjtnQkFBRSxnQkFBZ0IsQ0FBQyxRQUFRLEVBQUUsR0FBRyxJQUFJLENBQUMsQ0FBQztZQUUxRCxPQUFPLFFBQVEsQ0FBQztRQUNsQixDQUFDLENBQUM7UUFFRixvREFBb0Q7UUFDcEQsY0FBYyxDQUFDLFNBQVMsR0FBRyxRQUFRLENBQUMsU0FBUyxDQUFDO1FBQzlDLHlEQUF5RDtRQUN6RCxNQUFNLENBQUMsY0FBYyxDQUFDLGNBQWMsRUFBRSxNQUFNLEVBQUU7WUFDNUMsUUFBUSxFQUFFLEtBQUs7WUFDZixVQUFVLEVBQUUsSUFBSTtZQUNoQixZQUFZLEVBQUUsS0FBSztZQUNuQixLQUFLLEVBQUUsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsSUFBSTtTQUMzQyxDQUFDLENBQUM7UUFFSCxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBRTlELEtBQUssQ0FBQyxRQUFRLENBQUMsY0FBYyxFQUFFLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUU5QyxrREFBa0Q7UUFDbEQsT0FBTyxjQUFjLENBQUM7SUFDeEIsQ0FBQyxDQUFRLENBQUM7QUFDWixDQUFDO0FBRUQsTUFBTSxVQUFVLFFBQVEsQ0FBQyxTQUFpQixFQUFFLEdBQUcsSUFBVztJQUN4RCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUM1QyxTQUFTLEVBQUUsU0FBUztRQUNwQixJQUFJLEVBQUUsSUFBSTtLQUNYLENBQUMsQ0FBQztBQUNMLENBQUM7QUFFRCxNQUFNLFVBQVUsWUFBWSxDQUFDLFVBQWtCLEVBQUUsR0FBRyxJQUFXO0lBQzdELE9BQU8sUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsU0FBUyxDQUFDLGFBQWEsQ0FBQyxFQUFFO1FBQ2xELFVBQVUsRUFBRSxVQUFVO1FBQ3RCLElBQUksRUFBRSxJQUFJO0tBQ1gsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyIsImZpbGUiOiJtb2RlbC9kZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmluZE1vZGVsUHJvdG90eXBlLCBjb25zdHJ1Y3QgfSBmcm9tIFwiLi9jb25zdHJ1Y3Rpb25cIjtcbmltcG9ydCB7IE1vZGVsS2V5cyB9IGZyb20gXCIuLi91dGlscy9jb25zdGFudHNcIjtcbmltcG9ydCB7IE1vZGVsIH0gZnJvbSBcIi4vTW9kZWxcIjtcbmltcG9ydCB7IG1ldGFkYXRhIH0gZnJvbSBcIkBkZWNhZi10cy9yZWZsZWN0aW9uXCI7XG5cbi8qKlxuICogQHN1bW1hcnkgZGVmaW5lcyB0aGUgdHBlIG9zIGFuIEluc3RhbmNlQ2FsbGJhY2sgZnVuY3Rpb25cbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uQ29uc3RydWN0aW9uXG4gKiBAY2F0ZWdvcnkgQ29uc3RydWN0aW9uXG4gKi9cbmV4cG9ydCB0eXBlIEluc3RhbmNlQ2FsbGJhY2sgPSAoaW5zdGFuY2U6IGFueSwgLi4uYXJnczogYW55W10pID0+IHZvaWQ7XG5cbi8qKlxuICogQHN1bW1hcnkgRGVmaW5lcyBhIGNsYXNzIGFzIGEgTW9kZWwgY2xhc3NcbiAqIEBkZXNjcmlwdGlvblxuICpcbiAqIC0gUmVnaXN0ZXJzIHRoZSBjbGFzcyB1bmRlciB0aGUgbW9kZWwgcmVnaXN0cnkgc28gaXQgY2FuIGJlIGVhc2lseSByZWJ1aWx0O1xuICogLSBPdmVycmlkZXMgdGhlIGNsYXNzIGNvbnN0cnVjdG9yO1xuICogLSBSdW5zIHRoZSBnbG9iYWwge0BsaW5rIE1vZGVsQnVpbGRlckZ1bmN0aW9ufSBpZiBkZWZpbmVkO1xuICogLSBSdW5zIHRoZSBvcHRpb25hbCB7QGxpbmsgSW5zdGFuY2VDYWxsYmFja30gaWYgcHJvdmlkZWQ7XG4gKlxuICogQHBhcmFtIHtJbnN0YW5jZUNhbGxiYWNrfSBbaW5zdGFuY2VDYWxsYmFja10gb3B0aW9uYWwgY2FsbGJhY2sgdGhhdCB3aWxsIGJlIGNhbGxlZCB3aXRoIHRoZSBpbnN0YW5jZSB1cG9uIGluc3RhbnRpYXRpb24uIGRlZmF1bHRzIHRvIHVuZGVmaW5lZFxuICpcbiAqIEBmdW5jdGlvbiBtb2RlbFxuICogQGNhdGVnb3J5IERlY29yYXRvcnNcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG1vZGVsKGluc3RhbmNlQ2FsbGJhY2s/OiBJbnN0YW5jZUNhbGxiYWNrKSB7XG4gIHJldHVybiAoKG9yaWdpbmFsOiBhbnkpID0+IHtcbiAgICAvLyB0aGUgbmV3IGNvbnN0cnVjdG9yIGJlaGF2aW91clxuICAgIGNvbnN0IG5ld0NvbnN0cnVjdG9yOiBhbnkgPSBmdW5jdGlvbiAoLi4uYXJnczogYW55W10pIHtcbiAgICAgIGNvbnN0IGluc3RhbmNlOiBSZXR1cm5UeXBlPHR5cGVvZiBvcmlnaW5hbD4gPSBjb25zdHJ1Y3QoXG4gICAgICAgIG9yaWdpbmFsLFxuICAgICAgICAuLi5hcmdzXG4gICAgICApO1xuICAgICAgYmluZE1vZGVsUHJvdG90eXBlKGluc3RhbmNlKTtcbiAgICAgIC8vIHJ1biBhIGJ1aWxkZXIgZnVuY3Rpb24gaWYgZGVmaW5lZCB3aXRoIHRoZSBmaXJzdCBhcmd1bWVudCAoVGhlIE1vZGVsQXJnKVxuICAgICAgY29uc3QgYnVpbGRlciA9IE1vZGVsLmdldEJ1aWxkZXIoKTtcbiAgICAgIGlmIChidWlsZGVyKSBidWlsZGVyKGluc3RhbmNlLCBhcmdzLmxlbmd0aCA/IGFyZ3NbMF0gOiB1bmRlZmluZWQpO1xuXG4gICAgICBtZXRhZGF0YShNb2RlbC5rZXkoTW9kZWxLZXlzLk1PREVMKSwgb3JpZ2luYWwubmFtZSkoaW5zdGFuY2UuY29uc3RydWN0b3IpO1xuXG4gICAgICBpZiAoaW5zdGFuY2VDYWxsYmFjaykgaW5zdGFuY2VDYWxsYmFjayhpbnN0YW5jZSwgLi4uYXJncyk7XG5cbiAgICAgIHJldHVybiBpbnN0YW5jZTtcbiAgICB9O1xuXG4gICAgLy8gY29weSBwcm90b3R5cGUgc28gaW5zdGFuY2VvZiBvcGVyYXRvciBzdGlsbCB3b3Jrc1xuICAgIG5ld0NvbnN0cnVjdG9yLnByb3RvdHlwZSA9IG9yaWdpbmFsLnByb3RvdHlwZTtcbiAgICAvLyBTZXRzIHRoZSBwcm9wZXIgY29uc3RydWN0b3IgbmFtZSBmb3IgdHlwZSB2ZXJpZmljYXRpb25cbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkobmV3Q29uc3RydWN0b3IsIFwibmFtZVwiLCB7XG4gICAgICB3cml0YWJsZTogZmFsc2UsXG4gICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcbiAgICAgIHZhbHVlOiBvcmlnaW5hbC5wcm90b3R5cGUuY29uc3RydWN0b3IubmFtZSxcbiAgICB9KTtcblxuICAgIG1ldGFkYXRhKE1vZGVsLmtleShNb2RlbEtleXMuTU9ERUwpLCBvcmlnaW5hbC5uYW1lKShvcmlnaW5hbCk7XG5cbiAgICBNb2RlbC5yZWdpc3RlcihuZXdDb25zdHJ1Y3Rvciwgb3JpZ2luYWwubmFtZSk7XG5cbiAgICAvLyByZXR1cm4gbmV3IGNvbnN0cnVjdG9yICh3aWxsIG92ZXJyaWRlIG9yaWdpbmFsKVxuICAgIHJldHVybiBuZXdDb25zdHJ1Y3RvcjtcbiAgfSkgYXMgYW55O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzaGVkQnkoYWxnb3JpdGhtOiBzdHJpbmcsIC4uLmFyZ3M6IGFueVtdKSB7XG4gIHJldHVybiBtZXRhZGF0YShNb2RlbC5rZXkoTW9kZWxLZXlzLkhBU0hJTkcpLCB7XG4gICAgYWxnb3JpdGhtOiBhbGdvcml0aG0sXG4gICAgYXJnczogYXJncyxcbiAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBzZXJpYWxpemVkQnkoc2VyaWFsaXplcjogc3RyaW5nLCAuLi5hcmdzOiBhbnlbXSkge1xuICByZXR1cm4gbWV0YWRhdGEoTW9kZWwua2V5KE1vZGVsS2V5cy5TRVJJQUxJWkFUSU9OKSwge1xuICAgIHNlcmlhbGl6ZXI6IHNlcmlhbGl6ZXIsXG4gICAgYXJnczogYXJncyxcbiAgfSk7XG59XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function prop(key?: string):
|
|
2
|
-
export declare function propMetadata<V>(key: string, value: any):
|
|
1
|
+
export declare function prop(key?: string): (model: object, propertyKey?: any) => void;
|
|
2
|
+
export declare function propMetadata<V>(key: string, value: any): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
@@ -17,4 +17,4 @@ export function propMetadata(key, value) {
|
|
|
17
17
|
return apply(prop(), metadata(key, value));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy91dGlscy9kZWNvcmF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUV4QyxNQUFNLFVBQVUsSUFBSSxDQUFDLE1BQWMsU0FBUyxDQUFDLFNBQVM7SUFDcEQsT0FBTyxDQUFDLEtBQWEsRUFBRSxXQUFpQixFQUFRLEVBQUU7UUFDaEQsSUFBSSxLQUFlLENBQUM7UUFDcEIsSUFBSSxNQUFNLENBQUMsU0FBUyxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUM7WUFDckQsS0FBSyxHQUFJLEtBQWEsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUM5QixDQUFDO2FBQU0sQ0FBQztZQUNOLEtBQUssR0FBSSxLQUFhLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBQ25DLENBQUM7UUFDRCxJQUFJLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxXQUFxQixDQUFDO1lBQ3hDLEtBQUssQ0FBQyxJQUFJLENBQUMsV0FBcUIsQ0FBQyxDQUFDO0lBQ3RDLENBQUMsQ0FBQztBQUNKLENBQUM7QUFFRCxNQUFNLFVBQVUsWUFBWSxDQUFJLEdBQVcsRUFBRSxLQUFVO0lBQ3JELE9BQU8sS0FBSyxDQUFDLElBQUksRUFBRSxFQUFFLFFBQVEsQ0FBSSxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUMsQ0FBQztBQUNoRCxDQUFDIiwiZmlsZSI6InV0aWxzL2RlY29yYXRvcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBhcHBseSwgbWV0YWRhdGEgfSBmcm9tIFwiQGRlY2FmLXRzL3JlZmxlY3Rpb25cIjtcbmltcG9ydCB7IE1vZGVsS2V5cyB9IGZyb20gXCIuL2NvbnN0YW50c1wiO1xuXG5leHBvcnQgZnVuY3Rpb24gcHJvcChrZXk6IHN0cmluZyA9IE1vZGVsS2V5cy5BVFRSSUJVVEUpIHtcbiAgcmV0dXJuIChtb2RlbDogb2JqZWN0LCBwcm9wZXJ0eUtleT86IGFueSk6IHZvaWQgPT4ge1xuICAgIGxldCBwcm9wczogc3RyaW5nW107XG4gICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChtb2RlbCwga2V5KSkge1xuICAgICAgcHJvcHMgPSAobW9kZWwgYXMgYW55KVtrZXldO1xuICAgIH0gZWxzZSB7XG4gICAgICBwcm9wcyA9IChtb2RlbCBhcyBhbnkpW2tleV0gPSBbXTtcbiAgICB9XG4gICAgaWYgKCFwcm9wcy5pbmNsdWRlcyhwcm9wZXJ0eUtleSBhcyBzdHJpbmcpKVxuICAgICAgcHJvcHMucHVzaChwcm9wZXJ0eUtleSBhcyBzdHJpbmcpO1xuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcHJvcE1ldGFkYXRhPFY+KGtleTogc3RyaW5nLCB2YWx1ZTogYW55KSB7XG4gIHJldHVybiBhcHBseShwcm9wKCksIG1ldGFkYXRhPFY+KGtleSwgdmFsdWUpKTtcbn1cbiJdfQ==
|
|
@@ -10,7 +10,7 @@ import { ModelConstructor } from "../model/types";
|
|
|
10
10
|
*
|
|
11
11
|
* @category Decorators
|
|
12
12
|
*/
|
|
13
|
-
export declare function required(message?: string):
|
|
13
|
+
export declare function required(message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
14
14
|
/**
|
|
15
15
|
* @summary Defines a minimum value for the property
|
|
16
16
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#MIN}
|
|
@@ -22,7 +22,7 @@ export declare function required(message?: string): PropertyDecorator;
|
|
|
22
22
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
23
23
|
* @category Decorators
|
|
24
24
|
*/
|
|
25
|
-
export declare function min(value: number | Date | string, message?: string):
|
|
25
|
+
export declare function min(value: number | Date | string, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
26
26
|
/**
|
|
27
27
|
* @summary Defines a maximum value for the property
|
|
28
28
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#MAX}
|
|
@@ -34,7 +34,7 @@ export declare function min(value: number | Date | string, message?: string): Pr
|
|
|
34
34
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
35
35
|
* @category Decorators
|
|
36
36
|
*/
|
|
37
|
-
export declare function max(value: number | Date | string, message?: string):
|
|
37
|
+
export declare function max(value: number | Date | string, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
38
38
|
/**
|
|
39
39
|
* @summary Defines a step value for the property
|
|
40
40
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#STEP}
|
|
@@ -46,7 +46,7 @@ export declare function max(value: number | Date | string, message?: string): Pr
|
|
|
46
46
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
47
47
|
* @category Decorators
|
|
48
48
|
*/
|
|
49
|
-
export declare function step(value: number, message?: string):
|
|
49
|
+
export declare function step(value: number, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
50
50
|
/**
|
|
51
51
|
* @summary Defines a minimum length for the property
|
|
52
52
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#MIN_LENGTH}
|
|
@@ -58,7 +58,7 @@ export declare function step(value: number, message?: string): PropertyDecorator
|
|
|
58
58
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
59
59
|
* @category Decorators
|
|
60
60
|
*/
|
|
61
|
-
export declare function minlength(value: number, message?: string):
|
|
61
|
+
export declare function minlength(value: number, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
62
62
|
/**
|
|
63
63
|
* @summary Defines a maximum length for the property
|
|
64
64
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#MAX_LENGTH}
|
|
@@ -70,7 +70,7 @@ export declare function minlength(value: number, message?: string): PropertyDeco
|
|
|
70
70
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
71
71
|
* @category Decorators
|
|
72
72
|
*/
|
|
73
|
-
export declare function maxlength(value: number, message?: string):
|
|
73
|
+
export declare function maxlength(value: number, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
74
74
|
/**
|
|
75
75
|
* @summary Defines a RegExp pattern the property must respect
|
|
76
76
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#PATTERN}
|
|
@@ -82,7 +82,7 @@ export declare function maxlength(value: number, message?: string): PropertyDeco
|
|
|
82
82
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
83
83
|
* @category Decorators
|
|
84
84
|
*/
|
|
85
|
-
export declare function pattern(value: RegExp | string, message?: string):
|
|
85
|
+
export declare function pattern(value: RegExp | string, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
86
86
|
/**
|
|
87
87
|
* @summary Defines the property as an email
|
|
88
88
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#EMAIL}
|
|
@@ -93,7 +93,7 @@ export declare function pattern(value: RegExp | string, message?: string): Prope
|
|
|
93
93
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
94
94
|
* @category Decorators
|
|
95
95
|
*/
|
|
96
|
-
export declare function email(message?: string):
|
|
96
|
+
export declare function email(message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
97
97
|
/**
|
|
98
98
|
* @summary Defines the property as an URL
|
|
99
99
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#URL}
|
|
@@ -104,7 +104,7 @@ export declare function email(message?: string): PropertyDecorator;
|
|
|
104
104
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
105
105
|
* @category Decorators
|
|
106
106
|
*/
|
|
107
|
-
export declare function url(message?: string):
|
|
107
|
+
export declare function url(message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
108
108
|
/**
|
|
109
109
|
* @summary Enforces type verification
|
|
110
110
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#TYPE}
|
|
@@ -116,7 +116,7 @@ export declare function url(message?: string): PropertyDecorator;
|
|
|
116
116
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
117
117
|
* @category Decorators
|
|
118
118
|
*/
|
|
119
|
-
export declare function type(types: string[] | string, message?: string):
|
|
119
|
+
export declare function type(types: string[] | string, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
120
120
|
/**
|
|
121
121
|
* @summary Date Handler Decorator
|
|
122
122
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#DATE}
|
|
@@ -132,7 +132,7 @@ export declare function type(types: string[] | string, message?: string): Proper
|
|
|
132
132
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
133
133
|
* @category Decorators
|
|
134
134
|
*/
|
|
135
|
-
export declare function date(format?: string, message?: string): (target: Record<string, any>, propertyKey
|
|
135
|
+
export declare function date(format?: string, message?: string): (target: Record<string, any>, propertyKey?: any) => any;
|
|
136
136
|
/**
|
|
137
137
|
* @summary Password Handler Decorator
|
|
138
138
|
* @description Validators to validate a decorated property must use key {@link ValidationKeys#PASSWORD}
|
|
@@ -146,7 +146,7 @@ export declare function date(format?: string, message?: string): (target: Record
|
|
|
146
146
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
147
147
|
* @category Decorators
|
|
148
148
|
*/
|
|
149
|
-
export declare function password(pattern?: RegExp, message?: string):
|
|
149
|
+
export declare function password(pattern?: RegExp, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
150
150
|
/**
|
|
151
151
|
* @summary List Decorator
|
|
152
152
|
* @description Also sets the {@link type} to the provided collection
|
|
@@ -161,7 +161,7 @@ export declare function password(pattern?: RegExp, message?: string): PropertyDe
|
|
|
161
161
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
162
162
|
* @category Decorators
|
|
163
163
|
*/
|
|
164
|
-
export declare function list(clazz: ModelConstructor<any> | ModelConstructor<any>[], collection?: "Array" | "Set", message?: string):
|
|
164
|
+
export declare function list(clazz: ModelConstructor<any> | ModelConstructor<any>[], collection?: "Array" | "Set", message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
165
165
|
/**
|
|
166
166
|
* @summary Set Decorator
|
|
167
167
|
* @description Wrapper for {@link list} with the 'Set' Collection
|
|
@@ -175,4 +175,4 @@ export declare function list(clazz: ModelConstructor<any> | ModelConstructor<any
|
|
|
175
175
|
* @memberOf module:decorator-validation.Decorators.Validation
|
|
176
176
|
* @category Decorators
|
|
177
177
|
*/
|
|
178
|
-
export declare function set(clazz: ModelConstructor<any>, message?: string):
|
|
178
|
+
export declare function set(clazz: ModelConstructor<any>, message?: string): (target: object, propertyKey?: any, descriptor?: any) => void;
|